Using Batch files to copy back up files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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!
 
Personally, I wouldn't try to copy the database file while it is open: the
copy may not be in a consistent state.
 

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

Back
Top