Batch File to backup?

  • Thread starter Thread starter HeatherM
  • Start date Start date
H

HeatherM

I have a simple batch file to back up my tables to my C
drive (just in case!)
"copy F:\Database\Tables.mdb C:\Backup\Tables.mdb"
Is it possible to have it copy the mdb file and add a date
to the name e.g. copy Tables.mdb to Tables040108.mdb?

If a date is too much a simple number would do. I just
want to be able to keep a few backups on my disk without
them being overwritten.

Thanks
Heather
 
I copy a database/file inside access. Hear are a couple of
methods
Ex 1
copies db even when open
fso.copyfile "f:\database\tables.mdb", "C:\backup\"
&"tables"& Format(Date(),"mmddyy") & ".mdb"

Ex 2
copies db if not in use
FileCopy "f:\database\tables.mdb", "C:\backup\" &"tables"&
Format(Date(),"mmddyy") & ".mdb"

Jim
 
I'd advise VERY STRONGLY against copying the database when it's open. You
run the risk of it being in an inconsistent state. Just because FSO allows
you to copy an open file doesn't mean it's a good idea!
 
Back
Top