Search code examples
xcopy

Alternatives to XCopy for copying lots of files?


The situation: I have a pieceofcrapuous laptop. One of the things that make it pieceofcrapuous is that the battery is dead, and the power cable pulls out of the back with little effort.

I recently received a non-pieceofcrapuous laptop, and I am in the process of copying everything from old to new. I'm trying to xcopy c:*.* from the old machine to an external hard drive, but because the cord pulls out so frequently, the xcopy is interrupted fairly often.

What I need is a switch in XCopy that will copy eveything except for files that already exist in the destination folder -- the exact opposite of the behavior of the /U switch.

Does anyone know of a way to do this?


Solution

  • /D may be what you are looking for. I find it works quite fast for backing-up as existing files are not copied.

    xcopy "O:\*.*" N:\Whatever /C /D /S /H 
    
    /C Continues copying even if errors occur. 
    /D:m-d-y Copies files changed on or after the specified date. 
        If no date is given, copies only those files whose source time 
        is newer than the destination time. 
    /S Copies directories and subdirectories except empty ones. 
    /H Copies hidden and system files also. 
    

    More information: http://www.computerhope.com/xcopyhlp.htm