Monday, January 3, 2011

Taking regular backups of all files in a particular folder to another partition

A simple batch file that I have setup as a cron along with other server cron jobs (using pycron). The contents of the batch file:


REM rmdir "c:\FUTURE\" /s /q
REM mkdir "c:\FUTURE\"
xcopy "D:\FUTURE" "c:\FUTURE\" /y /E


The items in REM are for when I need to start anew otherwise not required (and in fact dangerous for the time when D goes down and data from c just gets deleted).