RAW Computing


Use Robocopy to copy and back up files in Windows

We are constantly being told to make backups and it is good advice. You never know when something might go wrong with the computer or with Windows and you need a copy of your files on another drive just in case the worst should happen. There are many ways to back up a computer though and one you may not have considered is Robocopy. This is a little known command in Windows that is actually quite useful.

Do you have Robocopy on your computer. Probably, but it depends on which version of Windows you have. Hold down the Windows key and press R, then enter cmd to open a command prompt window. Type robocopy and you should get something like this:

Windows Robocopy

There are a zillion command line switches for this command and it is very powerful and flexible. You can read all about the switches here. The brief details in the command window shows one possible use for it, but it is a bit sketchy on the details.

Suppose you want to copy the My Documents folder to an external drive and store it in D:\Backup. Type robocopy followed by a space, then open an Explorer window, go to C:\Users\YourName then drag the My Documents folder from Explorer and drop it on the command prompt window. Add a space, then type D:\Backup. Add /MIR which is short for MIRROR and makes the destination folder a mirror image of the source. Also add /MT:5 which tells robocopy to use five threads (this means it does five tasks at once) for extra speed. Hit Enter and it will back up My Documents. Here is the full command line on my computer, your's could be different:

robocopy "C:\Users\Roland\Documents" D:\Backup /MIR /MT:5

The first time you do this it creates the D:\Backup folder if it doesn't already exist and it copies everything to it. The next time you run this command, it only copies the files that have changed. So if you run it tomorrow and there are only 10 new files, it will only copy those 10 new files. This makes it really useful as a backup tool because subsequent backups are extremely quick.

The only disadvantage is that it cannot copy files that are in use, so you couldn't use it to back up the Windows folder for example, or a document that is open in Word say.

Affilate links follow...

| About