New
#11
sorry, yes, automatically.
The batch file should just copy and overwrite the old backup file with the new backup file without waiting for your response, I've left the /f switch so you know which files are being copied.Code:@echo off :start XCOPY "<Source Path>" "<Destination Path>" /f TIMEOUT /t 3600 /nobreak goto start
Thanks!
Nearly there, but it still asks me for "(YES/NO/ALL)". Is there a way to get this script to work automatically without running a Scheduled Task?
I've just tried the batch file out now, and it doesn't prompt for anything, the only problem with COPY command is that it doesn't sub directories I believe.Code:@echo off :start COPY "<Source Path>" "<Destination Path>" TIMEOUT /t 3600 /nobreak goto start
Yup. lovely it works.
Is there an add-on to this which enables files to be deleted, lets say older than a week?
Thanks!
You wouldn't able to use the Timeout command for a week though, since the command is limited to 99999 seconds, which if I worked it out correctly, is 27 hours.Code:@echo off DEL [[drive:][path]filename
You would have to create a different batch file, since I don't see how it could be added to the existing batch file without being added to the loop, which would mean your backups would be saved and then deleted every hour.
With the above command, at least you wouldn't have to go searching for the backups.