How can auto generate backup file name?

  • Thread starter Thread starter szeleungc
  • Start date Start date
S

szeleungc

How can auto generate backup file name,when Using win2003's backup
tools?
for example: YYYY_MM_DD
 
How can auto generate backup file name,when Using win2003's backup
tools?
for example: YYYY_MM_DD

In my time zone this works well:
set DateLabel=%date:~10,4%_%date:~7,2%_%date:~4,2%
ntbackup /.... /j %dateLabel%

You need to adjust x, y and z to work for your own time zone
by running this command from a Command Prompt:
echo DateLabel=%date:~x,4%_%date:~y,2%_%date:~z,2%
 
Back
Top