Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NTBackup

Status
Not open for further replies.

Nickela

MIS
Oct 22, 2002
29
US
Is there a way to set the backup file name in NTBackup to the current date so that if you schedule the job to run every week it will create a unique file name each time? Thanks for your help.

Nickela
 
I worked hard on it :)
I don't think you can do that with NTBackup but...
You can make a task in task scheduler who execute this batch file right after your backup:

REM Start of batch file
set thestart=copy yourbackup.dat "%DATE%.dat
set theend=" >> t1.cmd"
set all=%thestart%%theend%
echo %all% > t1.cmd
t1.cmd
REM End of batch file

Time to sleep now !

Martin

PS: Batch files are often really appreciate...
 
Thanks for your response, MontrealSoft. I am getting a message that the system cannot find the path specified and I am guessing it is because of the format that the %date% is returned. 'Fri 04/04/2003' Is there any way to change this format? Thanks for your help.

nickela
 
Ok, make sure you put your batch file where your backup file is...

yourbackup.dat must be the name of your backupfile, the same as in ntbackup

It's supposed to work fine.

Martin
 
If it does'nt work du to the date format, you can change it in regional settings from control panel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top