Using Batch files to copy back up files

A

Ann J

I am trying to copy the Access files that I create from a net work drive to
my C: drive. What do I need to do to get the access file I am working with
to automatically copy to my C: drive? I am having trouble correctly nameing
the network drive. I can get this to copy on the c: drive but when i try
using for example the o: drive it cannot locate the file. I also tried useing
the network name \\netwrok name and that did not work either
 
M

Mike Labosh

You shouldn't have trouble doing this in a batch file:

COPY o:\dir\my.mdb c:\dir

check the path to make sure you spelled it correctly. If any folder in the
path (or your mdb filename) contains any spaces, you have to put quotes
around it, or use the "short form" of the name that you can get from using
the DIR command:

COPY o:\files\my.mdb "c:\documents and settings\mlabosh\desktop"

or

COPY o:\files\my.mdb c:\docume~1\mlabosh\desktop

Command Prompt commands usually don't like UNC paths of the form:

\\server\share\folder\file.mdb

Generally, whenever you are using, running or writing something in a command
prompt, you have to have a mapped drive.

--
Peace & happy computing,

Mike Labosh, MCSD

Feed the children!
Save the whales!
Free the mallocs!
 
V

Van T. Dinh

Personally, I wouldn't try to copy the database file while it is open: the
copy may not be in a consistent state.
 
Top