XCOPY or ROBOCOPY

April 8, 2010
By

Ever wanted to copy a directory using the command line !? You have to use xcopy for windows xp and robocopy for windows vista windows 7.
Here is how it’s being done:

On windows xp:
xcopy /E /C /Y \\Path\to\folder\to\be\copied\from\cyecorp.ro “X:\Path\to\folder\to\be\copied\to\cyecorp.ro\”
/E – copies empty folders
/C – continues on error
/Y – yes to overwrite

and
on windows vista, windows 7:
robocopy /MIR \\Path\to\folder\to\be\copied\from\cyecorp.ro “X:\Path\to\folder\to\be\copied\to\cyecorp.ro\”
/MIR – Mirror a complete directory tree


You have to use quotes when folders have spaces in their names, like: Documents and Settings or you can reduce the name to its 8dot3 form like: Docume~1; in this case the quotes are unnecessary.

Example:
\\Path\to\folder\to\be\copied\from\cyecorp.ro “X:\Documents and Settings\cyecorp.ro\”

or

\\Path\to\folder\to\be\copied\from\cyecorp.ro X:\Docume~1\cyecorp.ro\
Sphere: Related Content

Leave a Reply

Calendar

    April 2010
    M T W T F S S
    « Mar   May »
     1234
    567891011
    12131415161718
    19202122232425
    2627282930