What is a better file copy alternative than the Windows default?

97,989

Solution 1

How about good old Command-Line Xcopy? With S: being the source and T: the target:

xcopy /K /R /E /I /S /C /H /G /X /Y s:\*.* t:\

/K Copies attributes. Normal Xcopy will reset read-only attributes.

/R Overwrites read-only files.

/E Copies directories and subdirectories, including empty ones.

/I If destination does not exist and copying more than one file, assumes that destination must be a directory.

/S Copies directories and subdirectories except empty ones.

/C Continues copying even if errors occur.

/H Copies hidden and system files also.

/Y Suppresses prompting to confirm you want to overwrite an existing destination file.

/G Allows the copying of encrypted files to destination that does not support encryption.

/X Copies file audit settings (implies /O).

(Edit: Added /G and /X which are new since a few years)

Solution 2

Use Robocopy (Robust File Copy).

NOTE:

In Windows Vista and Server 2008 when you type:

xcopy /?

you get:

NOTE: Xcopy is now deprecated, please use Robocopy.

So start getting used to robocopy :)

Solution 3

You can try TeraCopy or RoboCopy.

Solution 4

I would definitely prefer:

1) Teracopy - GUI based, replaces the default Windows copy/move UI and adds itself to context menu. Basic version is free (for home use I guess).

2) Robocopy - CLI based, useful when scripting. Free tool from MS and is included in Vista/Windows 2008. MS Technet has a GUI for robocopy as well - useful to create statements that you can later embed in scripts or on the command prompt.

PS: I know these have been already suggested here and I would have voted on them, if I could.

Solution 5

You really need to use a file Sync tool, like SyncBackSE, MS SyncToy, or even something like WinMerge will do the trick. I prefer SyncBack as it allows you to set up very explicit rules for just about every possible case and conflict, at least more so than the other two. With any of these you won't have to keep clicking all the pop-ups and you can verify, without a doubt, that the destination is exactly the same as the source.

Share:
97,989
Zack Peterson
Author by

Zack Peterson

Specializes in the design and creation of web and desktop applications. Contributes in all aspects of the software development process such as: requirements analysis and product definition; prototyping; choosing architecture and framework; interface design; database design; installation and integration; documentation and training; gathering feedback; and maintenance.

Updated on May 03, 2020

Comments

  • Zack Peterson
    Zack Peterson about 4 years

    I need to copy hundreds of gigs of random files around on my computer and am pretty leery of using the vanilla file copy built into Windows.

    I don't want it to hang on a "Are you sure?", "Are you really sure?", "Even zip files?", "Surely not read-only files too!" loop as soon as I step away.

    I don't want it to work for hours and then stop unexpectedly: "Someone once opened this file and so I won't copy it!" and then cancel the whole copy or just quit with no indication of what was done and what work remains.

    What file management programs do you have experience with? Which do you recommend?

    This question is related to my other question: How can I use an old PATA hard disk drive on my newer SATA-only computer?

  • Gordon Bell
    Gordon Bell over 15 years
    The primary complaint I've always had with XCOPY is that it always re-copies the files even if the destination file already exists with the same file size and modification date.
  • Chris Weber
    Chris Weber about 13 years
    There is no deprecation warning on Windows 7, but it does exist on Windows 2008.
  • huseyint
    huseyint about 13 years
    @Chris Weber: Yep, I've also noticed that, I really wonder the story behind.
  • Admin
    Admin almost 13 years
    @hyperslug I typed in that URL too and found this :) I'm jealous.
  • Christian Shay
    Christian Shay about 12 years
    Teracopy could not handle the case where the external drive cable came disconnected and then was reattached. Even if the drive letter is the same it gets permanently stuck on "Device not ready". That's the problem I came here to solve as I have 50 drives with loose connectors. :(
  • tim
    tim about 11 years
    that's nearly as cool as the dude whose username is "undefined"
  • phuclv
    phuclv over 10 years
    I've just try xcopy /s on windows 8 and get no note like that
  • Oliver Zendel
    Oliver Zendel about 10 years
    xcopy has a serious bug if the path of a single file while copying has more than 256 characters. xcopy will abort the whole operation with an 'insufficient memory' error -> don't use xcopy! As an alternative, this will do pretty much what xcopy does without the bugs: robocopy c:\srcdir d:\dstdir /XJ /SL /B /E /S /R:1 /W:1 /NFL /NS /NC /MT > mylog.txt 2>&1