file copy from batch file

J

JBowler

I need to copy all files from one server to another nightly. I have
scheduled a task to run my batch file but my batch file has syntax errors.

This is the format of my batch file:

----------------------------------
copy *.* \\mother\data e:\backup

----------------------------------
backup.bat

What I want to do is copy everything but it only copies the the files and
not the folders. I know thats becasue I used *.*. I have tried xcopy and it
does the same. What command do I use to copy all files from a network share
(\\mother\data) to my destination (e:\backup)?

Many Thanks

JBowler
 
W

Wouter

I need to copy all files from one server to another
nightly. I have scheduled a task to run my batch file but
my batch file has syntax errors.

This is the format of my batch file:

----------------------------------
copy *.* \\mother\data e:\backup

----------------------------------
backup.bat

What I want to do is copy everything but it only copies the
the files and not the folders. I know thats becasue I used
*.*. I have tried xcopy and it does the same. What command
do I use to copy all files from a network share
(\\mother\data) to my destination (e:\backup)?

Many Thanks

JBowler

You need to use the xcopy command instead.
There is build in help in de command window, type this:
help xcopy

I think the command should be:
xcopy \\mother\data\*.* e:\backup\ /E /Q
 

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