Monday, March 29, 2010

Add Date Time stamp to the Windows Backup File Name

1. Use the Windows Backup GUI interface to create a backup job. Make sure to
specify that it should not run now but later.

2. Open the Task Scheduler, then open the backup job that you just created.

3. Mark & copy the whole command line.

4. Create the new batch file "MyBackup.bat"

5. Paste the backup command line into it.

6. Create some blank lines at the top of the file, then paste the following
code into the empty space.

@echo off
set MyDate=%date:/=_%_%time::=_%
ntbackup /.. /.. /.. /F d:\Backups\%MyDate%_File_Backup.bkf

7. Adjust the last line of the above code so that it matches your own
switches, then remove the original Windows Backup command line.

8. Use the Task Scheduler to create a task that will invoke
"MyBackup.bat" instead of your previous Windows Backup command