At the moment it works just fine but as it is now, if I would like to do another backup a day later or so, it will overwrite the previous, so here comes the obvious...
How do I change it so it will add a date or consecutive number to the following Backup folders?
Like, Backup1, Backup2, etc or Backup(date), Backup(next date)
abbreviated cmd-file
@echo off :: variables set drive=C:\Backup set backupcmd=xcopy /s /c /d /e /h /i /r /y echo ### Backing up My Documents... %backupcmd% "%USERPROFILE%\My Documents" "%drive%\My Documents" echo ### Backing up Favorites... %backupcmd% "%USERPROFILE%\Favorites" "%drive%\Favorites" echo ### Backing up email and address book (Outlook Express)... %backupcmd% "%USERPROFILE%\Application Data\Microsoft\Address Book" "%drive%\Address Book" %backupcmd% "%USERPROFILE%\Local Settings\Application Data\Identities" "%drive%\Outlook Express" echo ### Backing up email and contacts (MS Outlook)... %backupcmd% "%USERPROFILE%\Local Settings\Application Data\Microsoft\Outlook" "%drive%\Outlook" echo ### Backing up the Registry... if not exist "%drive%\Registry" mkdir "%drive%\Registry" if exist "%drive%\Registry\regbackup.reg" del "%drive%\Registry\regbackup.reg" regedit /e "%drive%\Registry\regbackup.reg" echo Backup Complete! @pause