This Instructable will show you the reasoning behind, and the correct codes to create a backup system, backing up an external drive (e.g. SD Card, USB Drive etc.)

This system should be used entirely for your own personal use and too make your life that little bit easier. I therefore reserve the right not to be held responsible for any activity, in which you should use this information, outside of this Instructable.

Step 1: Huh?!? Why Notepad, That's the Most Useless Program Ever!

There is one basic command really and that's ROBOCOPY.
Those with earlier versions of windows may be more familiar with it as XCOPY.

Robocopy is basically a mass copying command, used to copy many files over networks in businesses or otherwise.

Here is the script for my system, you'll have to change yours so that you can copy what to where.

So type this out on Notepad!

@echo off
ROBOCOPY I:\. F:\sd_card_backup /E /ETA /Z /MIR

I:/. (that's my target drive, the . is to specify "copy the whole thing")

F:/sd_card_backup (that's my destination drive, the "sd_card_backup" is the name of the folder I want to save it all in. If this older doesn't exist then one will be created. Oh, and my drive value is "F:/" cause I have an external one. Yours will probably be "C:/")

/E (tells the system to copy all the folders, even if there empty. This way you can have a complete replication of the folder/drive you copied.)

/ETA (will give you an Estimated Time of Arrival, see what they did there?)

/Z (you don't need to worry about this, it's just the type of copying that works best for small copies)

/MIR (again, this assures you have a mirror of what you copied, to make sure you've got absolutely everything)


Your text may look like this if you were backing up your USB drive for example:

@echo off
ROBOCOPY G:\. C:\users\user\documents\USB_backup /E /ETA /Z /MIR

This would copy your entire G drive (hopefully your USB) to your documents, creating and placing it in a folder called "USB_backup".


Step 2: So Now What, All I've Got Is This Rubbish Writting That Means Nothing!

Time to save it!

All you need to do now is save it as a batch file

Got to
File --> Save

Make sure your drop down box is selecting "All Files" and you type ".bat" at the end of the file name!

See the picture for more details!

Step 3: And Hey Presto!

So that's basically it. The rest is really easy.

You just click on the file, and depending on the amount of stuff you copy, it might just flash up for a second and go.

If your really lazy then you can download the script for mine below and change it as you wish:

And if enough people ask for it then i'll design one where you can input the details yourself and it'll do it for you. Laziness at it's fullest! P.M me if you have any real problems or any requests.

Have fun!
Hope this helped!

EDIT: I got so bored today that I decided to make that system file I talked about earlier, so here it is. I called it "IBUS" (I liked it to!) and it prompts you for input to personalise your backup. Oh and read the READ ME file that comes with it too!

Let me know what you think!

i downloaded your ibus file, tried and absoulely love it thks for great instructable <br>Two Thumbs up
I've been using robocopy for a while now, I was looking for an alternative to rsync in unix and found it then made up some batch files. Good instructable though.
i robocopy the same as xcopy?
Robocopy is designed for reliable mirroring of directories or directory trees. It has features to ensure all NTFS attributes and properties are copied, and includes additional restart code for network connections subject to disruption. xcopy was just an extension of the plain old copy command so that it could do directories.
ohhh... thanks i wasnt sure :] but is robocopy a seprate program or is it still in the command prompt :S sorry for all the questions lol
Robocopy is a separate program that is run from the command prompt. You'd need to obtain it, at say here: <a rel="nofollow" href="http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;displaylang=en</a><br/><br/>It's in a resource kit on their site, download and extract the exe. I just also read somewhere that they have a gui for it as well somewhere.<br/>
i see, thank you very much :)
Even though xcopy.exe is an extension of the original &quot;copy&quot; command, it supports the copying of archived, hidden, and system files, as well as preserving any attributes that these files have.<br><br>However, you can just open up &quot;My Computer&quot;, and right-click on the desired drive, and select &quot;Copy&quot; from the drop-dialog<br><br>This way, you can rely on the Windows copying system to cover everything you need reliably, as well as any hidden files in the parent directory that you may not have selected when copying from the parent directory.
if I add another line before the EXIT with the same commands on it but a different path to copy to (so it backs up my flash drive to my pc and to my external hard drive) will it copy the files to BOTH locations before exiting?
ok I tested it, and it SEEMS to have worked. I havent made sure EVERY file is correct, but I checked both backup locations and all of the folders are correct, and the files inside SEEM to be correct, even my invalid files (such as an encrypted mountable drive that is disguised as an invalid .png file) are there.
Yeah it should work, just use the same idea s the instructalbe for the line before exit and your ready to go. And yes the system is designed to mirror your directory tree (but not deleting files in the destination if deleted in the source).
I noticed something weird - when my flash drive is plugged in, the backup directory mirrors it perfectly. but when its unplugged, any changes Ive made to the backup directory come back
this is a great instructable! I always find it a hassle to backup my flash drive manually, but now I just run this file and it does it automatically! sweet.

About This Instructable




More by theknight:Take back the Internet: No more adverts on 4od - with no addons or software! Use batch to print a directory tree of a target computer NETsend with VBScripting 
Add instructable to: