# Schedule Task to Overwrite Files



## YG181 (Jun 16, 2016)

Hello,

I am looking to create a task that will copy an excel file from my desktop and paste it into an autodirectory folder for a dashboard. the excel file is getting live queries from a database every 30 minutes, so i need to copy the file into the autodirectoy so it will update the dashboard as well. However, one little clause here is that because the autodirectory folder will contain a file with the same name, it will need to overwrite that file to the newer version. 

Does anyone know how i could create that task to do this command?

Thanks,
Yorke


----------



## Triple6 (Dec 26, 2002)

copy _SOURCE_ _DESTINATION_ /Y

/Y will overwrite without a prompt. You can save that as a batch file and execute that as a Windows Scheduled Task.

That will only work if the file is not open.


----------

