Wednesday, August 26, 2009

Robocopy trumps RichCopy

Microsoft has released a new replacement for Robocopy. What's Robocopy you ask? Only about the best way to copy a lot of files across a network via the command line in Windows.

Robocopy will copy a directory with any amount of files and subdirectories. It will merge the contents of the directories if duplicates already exist in the destination depending on options you pass it. If a file cannot be read, it will pause and retry a certain number of times, and if you lose your network connection during the copy, when your connection is back, you can reissue the same command, and it will pick up where it left off, not recopying the files it already copied.

It's a really great command line tool and I wish drag and drop copying in both Windows and Mac OS X behaved like this instead of failing miserably if the network drops or wiping destination directories out even if they contain different files from the source.

Robocopy is great. It's one of the first things I install on a freshly formatted Windows box.

So what could be better then Robocopy? According to Microsoft TechNet, RichCopy. RichCopy is the next generation Robocopy adding an easy to use GUI and performance enhancing multithreaded copying (so it can move more then one file at a time which reduces network lag if you are moving a lot of small files.)

So today I installed RichCopy and put it to the test. I needed to move a directory that had 19.8GB in 69,510 files and 13,654 directories (or folders if you prefer.) I started RichCopy and used its GUI interface to start the copy. My network performance was only about 10Mbps (I'm on gigabit people) but it's an overworked corporate network, so I don't think that's any fault of RichCopy. Unfortunately about an hour and 45 minutes into the job, the server disappeared from the network for a second. No problem, right? That's the kind of thing RichCopy was made to handle. Unfortunately at that point RichCopy crashed with an exception, and the only option was to close the exception dialog which closed the RichCopy application.

So now I've got Robocopy doing the copy. It doesn't have a fancy GUI but it's working.

Oh BTW, there is also a GUI for Robocopy here. But I tried it and it had at least one bug (back when I tried it.) It may work for you, but, if you are looking for a robust copy tool, chances are you can handle the command line anyway.

Here's something to get you started on Robocopy:

robocopy source destination /S

By default robocopy won't copy files that appear the same so it always performs a merge and that's what this command line will to. The /S says to be recursive but don't copy empty directories.

The Wikipedia entry on Robocopy covers all the optional parameters.

6 comments:

mt2ri said...

Thanks, I was trying to convert some RoboCopy scripts to RichCopy, but the more I look at it, RoboCopy wins. Use the options:
/NFL /R:5 /E /XO /PURGE and you've created a fast, easy way to keep 2 directories synchronized. Bonus, it creates an easy to read log file.

Soccer Dad said...

i couldn't get richcopy gui version to install; horrible experience

Unknown said...

With Path too long error I use an alternative "Long Path Tool" to get fast and easy fix .

Unknown said...

There are too many commands and code! Can't we just simplify it. To do this task, Currently I am using GS Richcopy 360. I works both on windows and for FTP. Its really easy to use,provides multi threaded file transfer, long path name support and many other features! You should also try it!

Guru Squad said...

Hey I don't have words to describe this post for Robocopy GUI Tool. I simply want to say that absolutely informative post. It inspires me a lot. Keep posting.

Guru Squad said...

We found your blog about Robocopy was much handy to me! If u keep up the good job I’ll come back at your website. Finally I have found something which helped me. Appreciate it!