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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOS .BAT file mdb backup question

Status
Not open for further replies.

jabrony76

Technical User
Apr 23, 2001
125
US
Hi all -

This may be a bit off the VBA path but what the hell...

I've written two simple DOS bat files that creates backups of either my front end or back end. They work fine upon launching them.

Problem is, I would like to place these in my windows/startup folder so I don't have to ever remember to run these and the db's will automatically backup upon starting my computer.

Sounded like a great idea, but it doesn't work and i can't figure out why... Anyone know why? Heres the .bat code:
[red]
for /f "tokens=1-4 delims=/ " %%a in ('date /t') do (set date=%%b& set month=%%c& set year=%%d)

cd "S:\CCDBv3.0"

copy Back_End\CCDB_v3.0_data.mdb Backups\Back_End\CCDB_v3.0_data_%date%%month%%year%.mdb
pause [/red]


Any help would be greatly appreciated.
Thanks!
Andy[thumbsup]
 
i do the same using batch files to run backups but i have put the tasks in scheduler under control panel, works excellent that way. If you want, you can do that and schedule it to run whenever your computer starts. I am sure this will solve your problem, let me know if it works, Hamza
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top