Question

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?

Was it helpful?

Solution

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)

OTHER TIPS

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 :)

You can try TeraCopy or RoboCopy.

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.

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.

You can try SuperCopier, it replaces the standard Windows copy mechanism while loaded.

It can retry failed files at the end, resume a canceled copy (even a copy canceled by Windows), accepts "All" for every answers. You can even answer the annoying questions (file already exists, error copying file) before they occur.

Big thumbs up for robocopy. I use it for doing the sort of things you mention.

For example I'm currently running 5 robocopy sessions on my server where I'm copying about 60GB of files between 3 remote servers, I'm connected to two via a CheckPoint VPN and the other is an Amazon S3 space mapped via JungleDisk.

I'm working with a colleague at the other end of the country. He'll log in to the same servers later tonight and run a similar set of robocopy batch files to download all the changes I'm currently uploading.

The 'killer app' feature is that robocopy will retain file date/time stamps and, by default will ONLY copy files that are different. So you can point it at a huge dir tree and only changed files will be copied.

Here's some useful tips for doing this sort of thing...

/MIR mirrors a dir tree so will delete as well as add

/R:10 tells robocopy to try 10 times to copy the file before giving up. The default is 1,000,000 times

/LOG+somefilename.log will append the screen output to somefilename.log, creating it if necessary.

/XD dir1 dir2 will ignore any dirs named dir1 or dir2 in the copy. Wildcards can be used.

/FFT will use FAT time stamps which are less accurate than NTFS (uses a 2 sec granularity in timestamps). I also find this one useful when copying between Linux file systems and NTFS.

I typically use something like

robocopy d:\workdir y:\workdir /TEE /LOG+:d:\update.log /MIR /R:5

which will mirror (/MIR) d:\workdir with y:\workdir, append a log of what it does to d:\update.log (/LOG+d:\update.log) writing output to both the console and the log file (/TEE), and try each file 5 times before moving on to the next one.

It also works with UNC paths.

If you've got a large collection of files that need syncing over a number of PCs then robocopy is your friend.

It sounds like a backup-style tool may be what you're looking for.

I've been using SyncBack (one of the versions is free). You could also try out MS SyncToy which tries to make moving, copying, syncing, etc. easy.

If you really do copy just random files at random times, you could try Total Copy which has the added benefit of working well over a network (pause, resume, etc.).

Use Robocopy, it has the ability to copy files in "restartable mode", plus it should respect the file attributes. And it comes with Vista and Server 2008, and you can download it for older OS's. Plus you can set it to retry on failed copies, to pick up files that are temporarily in use by another process.

Besides XCOPY, RoboCopy and TeraCopy that have already been suggested, you may also try out Total Commander.

Powershell scripts might be useful too and surely more flexible than xcopy and other DOS commands. You can easily recurse through sub-directories, filter your files by name or extensions, treat especially some particular files based on the criteria of your choice, etc. The Powershell community web site is a good starting point.

I've tried out Copy Handler and it works very well. It has some cool features where you can control buffering depending on the type of media and with file queuing support so you can setup your copy and move operations and forget about them and minimize disk fragmentation at the same time. So it won't copy multiple file simultaneously from a single CD or DVD as it would make the drive seek too much.

Best of all its Open Source.

Xcopy keeps the Date Modified, only the Date Created and Date Accessed will change.

(tested on XP Pro, try it on a small folder to check if you're using Vista as I did not test it under Vista)

Edit: You MAY want to redirect the Output though:

xcopy /K /R ....... s:\*.* t:\ >c:\xcopy.log 2>&1

That way, if files fail to copy you can check the log (i.e. System Volume Information will generate an error, but that folder does not matter anyway for what you're trying to do)

I've been using Copy Handler. The nicest thing about it is that it queues up its jobs like a download manager. It has a shell extension so you can either rightclick drag, or just set copy with copyhandler as the default action.

Besides the already mentioned Robocopy, XXCOPY has a free version. Its syntax is backwards compatible with XCOPY, but has tons of additional options (XXCOPY /HELP > x create a 42kb file with all the options available). For instance, you can delete files with it, include or exclude a list of directories for the copy, use it as a "touch" utility, etc.

I've been using it for years, it's 2 thumbs up.

ZTreeWin It's a 32 bit text-mode, tree-structured file/directory manager for Windows. Very easy to use, there is a menu but this also shows the keys for various commands. Easy to navigate around the file system and it has a has split pane mode so you can work with both source and target easily, with only ever a few keystrokes. It is far more effective for getting things done than Windows Explorer or Xcopy.

I've tried KillCopy 2.85 and I can say only one - this is a powerful copy software which can replace a windows file copy on 100%. May be the best from alternatives that i've tested for now. File transfer is very fast. KillCopy is the fastest software and can copy files with 40 MB/s. Reasons for my choise is simple - KillCopy works fine on all Windows platforms without mean whats is architecture - 32 or 64 bits.

A GUI front-end for xcopy is available at: http://lorenstuff.weebly.com/ (free) controls are:input, output, set switches & run. Not a replacement or an improvement on xcopy, just a GUI to simplify operation.

I built myself a PC with 4GB RAM, dual core 1.8GHz 40GB PATA drive primary, and 250GB SATA drive secondary, and installed Windows Vista Business Edition. When I had to copy 120GB of data from my old PATA disk, Vista failed miserably and kept crashing. I definitely recommend Teracopy Free Edition.

Copywhiz program (commercial) seems to solve the exact problems you listed.

Xcopy [source] [destination] /e /c /h /o /d 

Copies eveverything that has not previously been copied. Essentially works as restartable since you can just press up and enter and it will commence where it was up to when you stoped it or it lost connection. Does not copy files that have already been copied and preserves onwership and attributes.

It also ignores errors so if ti can't copy something it just keeps going.

I remeber it because its xcopy echo(e)d

Reboot into Linux, mount the drive, and use GNU cp.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top