Know Your Tools

I recently had to copy a very large file (>4GB) from a remote Windows share to my Windows 7 machine, over a very finicky connection (frequently-failing VPN over a slow Internet connection). A GUI copy didn’t work because the connection dropped frequently. I tried Free Download Manager, which was the recommended tool for the download, but surprisingly, it wasn’t always able to restart the download after connectivity dropped.

Then a colleague pointed me to the “copy /z” command:

  /Z           Copies networked files in restartable mode.

And this simple, built-in tool turned out to be the thing I needed. It was, every time, able to restart the download properly, and after a few times, it downloaded the file correctly.

As you may know, I am a reluctant recent switcher to Windows, coming from Linux and Mac OS X. I confess I still have a condescending attitude to everything in Windows, but this teaches me a lesson: it pays to know the native tools of the system you are using. I had subconsciously dismissed the built-in DOS copy command as too primitive to work, but it turned out to have the capabilities I needed.

A couple of tips:
  • If you interrupt the command with Ctrl-C, it will delete the portion copied so far and you’ll have to restart the copy from the beginning. If you must interrupt a copy, simply terminate the network connection (it will die with an error, but leave the copied-so-far file) or close the window where the command is running.
  • When you restart it and it asks if you want to overwrite, you must answer “yes”. You can also use the /Y flag.