Delete excel file in a certain hour automatically

Hi every one, I would like to ask if it is possible in Uipath to delete a certain excel file every day in a certain hour( for example I want to delete an excel file that I have inside the project everyday at 23:00).Is it possible and if yes how can it be done?
Thank you

use delete file activitity and provide the path if the file .
before that check a condition
if currentsystemtime=23:00 (CUSTOM TIME)
Delete file


we have to create a new process for that… And need to publish it to orchestrator… From there we can use time trigger to run the process…

The process should like this…

  1. Verify the folder-FolderExists
    2.Verify the .xlsx file-FileExists
    3.Delete the excel-DeleteFile


So this can be done without the help of the orchestrator as per I understand.

My intention was without the help of the orchestrator, but in case I find no other solution ill have to use this one.thank u

yes of course …
you develop this as a background process
so that when it runs you can involve in other processes

1 Like

without orchestrator … you make a batch file and trigger it at 11 pm using task scheduler

Sounds good, will try to implement it and see if it works.thank u Sree

in case I do it with the IF like your first suggestion, I should declare a variable of what type and what value should I give to that variable?

for example:  
thisvariable (type?)=
If thisvariable=currentsystemtime than delete the file.

Is it fixed that you should have to delete the file at sharp 11 am

then no need of putting a condition

simply check path exists
if exisits
delete file

thats all

and trigger this program at 11 pm sharp by using task scheduler using a batch file

Does this works eventhought I want to delete the excel file but keeping the header? I want to keep the header and delete all the rest

then do as below:

Path exists
if exists
then read range and store it in a DT
use clear DT
delete file excel
write range to a new excel with DT