PDA

View Full Version : Writing XCOPY .bat



The0men
07-29-2009, 01:11 AM
Hello can anyone please help me write a batch file to copy all my
files from one hard drive to another hard drive,
and make it leave alone the existing files (to save time)
and only overwrite files that have been updated or modified,
and files that don't yet exist?

I'm afraid I don't know anything about this, I just read about it recently.

XS_Rich
07-29-2009, 01:20 AM
Hello can anyone please help me write a batch file to copy all my
files from one hard drive to another hard drive,
and make it leave alone the existing files (to save time)
and only overwrite files that have been updated or modified,
and files that don't yet exist?

I'm afraid I don't know anything about this, I just read about it recently.

You don't need to write a batch file really, you just need 'robocopy'.

http://en.wikipedia.org/wiki/Robocopy

Does everything you want it to, and apparently comes with a GUI now (though it's dead easy to use at the command line).

[XC] Oj101
07-29-2009, 01:58 AM
If you really want an xcopy.bat, here:

xcopy c: d: /h /i /c /k /o /r /e /y

A nice mnemonic which actually works.

The0men
07-30-2009, 10:51 PM
If you really want an xcopy.bat, here:

xcopy c: d: /h /i /c /k /o /r /e /y

A nice mnemonic which actually works.

That one doesn't allow me to only overwrite files that have been
modified and replace them with more recent ones, and leaving files
that are unchanged. It just copies the entire drive contents,
which take a long time to copy 400GB across USB.
Thank you though.


You don't need to write a batch file really, you just need 'robocopy'.

http://en.wikipedia.org/wiki/Robocopy

Does everything you want it to, and apparently comes with a GUI now (though it's dead easy to use at the command line).

Thanks mate.

[XC] Oj101
07-31-2009, 12:05 AM
Never mind, that'll teach me for only reading the first two lines.