I would like to ask if it is possible that in a project in which u have an excel file with the today date as name that saves inf for today runs, if it is possible that tomorrow when u do the first run the system checks before if there is any excel that exists with the date of the day that it will executes( so it means that for everyday, before the robot goes and do what he has to do, he checks if there is any excel with the actual date of that day) If yes he goes and continue the job, if not,he deletes the exists excel and creates a new one with the date of that date.
How can I find if there is any excel with the date of the actual date, maybe with Path exists?
2.How can I tell the robot to go and delete the other excel that exists in case the one that we want does not exists and it will go and create a new one?
For the moment I have only an excel with TodayDate+“xlsx” created for the today date. Any idea if this is possible please?
I see. In this case how can I tell the program go and delete the file that exists because it is not the one that I need and create this other one that I need with the today date? For example the one that I need to delete contains the yesterday date
I was thinking to declare a variable called YesterdayDate and in that one I add the date of yesterday smth like System.DateAdd(“d”,-1,(System.DateTime.Today)) and than I do YesterdayDate+“xlsx” ?