.BAT file Copy Access DB on an Interval

C

chriscooz

Hi-

I'm familiar enough with the commands to copy files using a batch file. What
I can't find much help on is being able to copy an Access file on a certain
interval. let's say, at 5pm every night. Can anyone give me a quick refresher
on this? Or refer me to somewhere to look? ..I'm not getting good results
from google.

i looked into copying the database programatically but, it looks to be more
of a hassle than a batch file that runs itself at 5 every night.
 
J

Jackie L

I have not done the update on a time interval but I have put the .bat in the
startup of the workstation or on the icon to execute the database so that an
update always runs before opening the program on the workstation.

Hope this helps.
 
K

Kernow Girl

Chris - wouldn't using scheduled tasks be easier? You can schedule your .bat
file to run at a certain time each day. Many years ago I also tried doing
what you are trying (when my DOS was not so rusty as now and I was using
expanded bat commands) but if I remember correctly I finally found a little
backgroud 'timer' to use. No idea any more what it was called, but if using
XP, the Schedulded Tasks should work.
Yrs - Dika
 
J

John Vinson

Hi-

I'm familiar enough with the commands to copy files using a batch file. What
I can't find much help on is being able to copy an Access file on a certain
interval. let's say, at 5pm every night. Can anyone give me a quick refresher
on this? Or refer me to somewhere to look? ..I'm not getting good results
from google.

i looked into copying the database programatically but, it looks to be more
of a hassle than a batch file that runs itself at 5 every night.

Dika's advice about using the Windows Scheduled Tasks is the ticket
for what you want.

One caution: if the database is open - and especially if anyone is
editing any data in it - at the time you make the copy, you are almost
certain to get database corruption in the copy. Access is NOT designed
to support "hot backups". In your .bat file, check first to see if
there is a .ldb file with the same name as the database in its folder;
this indicates that someone is using the database and that the copy
should not be run until later.

John W. Vinson[MVP]
 
A

aaron.kempf

MDB is a pain in the ass

use Access Data Projects and the SQL job management tool aka SQLAGENT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top