NTbackup not starting job

sameh_mhumaid
sameh_mhumaid used Ask the Experts™
on
I'm trying to run the following command after ameding the file name to include the date with no luck
any ideas?

C:\WINDOWS\system32\ntbackup.exe backup "@C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\usersjob.bks" /n "usersbackup.bkf created 21/10/2010 at 10:49 AM" /d "Set created 21/10/2010 at 10:49 AM" /v:yes /r:no /rs:no /hc:off /m normal /j "usersjob" /l:s /f "G:\PNSP\Users\usersbackup %date:/=-.%.bkf"
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
davealfordIt Support

Commented:
it'll be trying to use %date%:/= as text in the filename as you've enclosed in quotes so it's a literal string

Author

Commented:
I should remove the quotes?
Krzysztof PytkoSenior Active Directory Engineer
Top Expert 2012

Commented:
I would suggest reading this article with setting up NT Backup in command-line that using syntax from Task Scheduler job ;)

http://support.microsoft.com/kb/814583

Should solve your problem :)

Regards,
Krzysztof
Hello!

I think your problem in a missed backslash here

backup %date:/=-.%.bkf"

(after backup and before %date)

PS: Quotation don't affect environment variables. You can test it by executing
echo "%date% %time%" in command prompt.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial