I have a mdb file at C:\Program Files\ApplcationName\filename.mdb. Please let me know the COPY command to take a backup using .bat file to a folder C:\Backup.
In short i am having probles because of the space between "Program" and "Files".
Thanks
jaz
Best Answer
The filename portion of the backup is the worst part to create. You need to be able to create a new file everyday without too much hassle. So here's what I use:
If you combine two of these answers (mine and a previous one) you get this gem:
Doing it this way will give you a file for ever day its run, named with the date.
A complete backup script would look like this
This is a complete interactive solution. But the real power is in the
set mydate
line. Being able to slice a string is a forgotten art in DOS;I take the command output of date, then cut it up, and spit out something that can be used as a filename. That way a new file is created everyday, and you can have a "real" backup system.
Just edit the servernames, DC1, FS1, EXCH and put in your own, or just use drive paths.