- Jul 27, 2006
I have a PC set aside to just back up a server. Its faster for me to recover from the PC then tapes. Anyway I want just one folder to have the back up in and I want the back up to keep over writing the old data every 4 hours. But my batch is creating a new folder for every back up and I am now out of space. So my question is how should I modify my batch to overwrite?
@echo off :: variables set drive=c:\Backup set folder=%date:~7,2% set backupcmd=xcopy /s /c /d /e /h /i /r /k /y echo ### Backing up directory... %backupcmd% "G:\" "%drive%\%folder%" echo Backup Complete! @pause