Nav links

Sunday, 3 October 2010

Faster copying in Windows

I had to copy 60GB, in the form of three 20GB files, from a WinXP box to a Win7 box on my local network today. It was only when I reached the third of these files that I found a much faster method than blithely using Windows Explorer. The answer was a command-line tool that comes as standard in Windows 7 - Robocopy.

Although Robocopy has a plethora of options, I was only interested in using it to copy a single file from a network share to my local PC. The additional speed came from enabling multiple threads, which are not enabled by default (just add /MT to the command). I didn't time the transfers, but I reckon they were roughly:
Windows Explorer (initiated in WinXP): about 4 hours
Windows Explorer (initiated in Win7): about 3 hours
Robocopy (2 threads): about 1 hour

If I regularly had to transfer large files I do some proper testing to determine the optimal number of threads. I'm not sure why more than one thread would speed things up, so I'd initially want to check that multiple Robocopy threads are indeed better than one. Still, it's always good to discover a new tool.