Hi,
I currently have .BAT files (that run at scheduled time in Task Scheduler) and they backs up files and folders from the Server to the shared folder off the workstation PC. I have five .BAT files like below.
Monday.bat
Robocopy C:\Data \\frontdesk2\ServerBackup\Mon\Data /MIR /W:0 /R:0
Tuesday.bat
Robocopy C:\Data \\frontdesk2\ServerBackup\Tue\Data /MIR /W:0 /R:0
Friday.bat
Robocopy C:\Data \\frontdesk2\ServerBackup\Fri\Data /MIR /W:0 /R:0
I like to be able to combine all these batch files into one by writing a script like below and have just one in TaskSchd.msc.
If today is Monday then
Robocopy C:\Data \\frontdesk2\ServerBackup\Mon\Data /MIR /W:0 /R:0
else if today is Tuesday then
Robocopy C:\Data \\frontdesk2\ServerBackup\Tue\Data /MIR /W:0 /R:0
else if today is Friday
Robocopy C:\Data \\frontdesk2\ServerBackup\Fri\Data /MIR /W:0 /R:0
endif
Is it possible?
Saturday = 6:
Open in new window