backup with xcopy

K

Kostas K.

Hello!

I want to use xcopy to copy a few folders from one drive to to another
folder on another drive for backup purposes. Could somebody tell me how to
do it with a single xcopy statement?

e.g. instead of writing:

xcopy c:\1 d:\
xcopy c:\2 d:\
xcopy c:\3 d:\

write something like that (the following does not work)

xcopy c:\1+c:\2+c:\3 d:\

Thank you

Kostas
 
D

Donald G. Davis

Kostas K. said:
I want to use xcopy to copy a few folders from one drive to to another
folder on another drive for backup purposes. Could somebody tell me how to
do it with a single xcopy statement?
e.g. instead of writing:
xcopy c:\1 d:\
xcopy c:\2 d:\
xcopy c:\3 d:\
write something like that (the following does not work)
xcopy c:\1+c:\2+c:\3 d:\

It can't be done with a single XCOPY command, but if you simply
save your block of commands as a text file and name it with a .BAT
extension (e.g., BACKUP.BAT), then run BACKUP as a command, the batch file
will automatically execute your XCOPY commands in sequence.

--Donald Davis
 
B

Brian Jones

Donald said:
--Donald Davis

Better yet, just download XXcopy. It's free. Bypasses the limitations of
the MS version of Xcopy. XXcopy works great--I use it all the time to
mirror my HDs.
 
K

Kostas K.

I have tried both xxcopy and microsoft's robocopy.

But my problem remains the same,

either with xxcopy /clone or robocopy /mir, how can I select multiple
directories to do my backup all in one go?
 
J

John

Use a FOR statement. You work out the exact syntax (Microsoft shits me).
Something like:

for %f in (c:\1 c:\2 c:\3) do xcopy %f d:\
 

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