Instructables

Easy file backup for Windows!

Picture of Easy file backup for Windows!
This is a super easy tutorial on how to backup your files on Windows. All you need is a flash drive!
I will do this with the command prompt. Every time you plug in your flash drive just give it a second and you can take it out, your files will then be backed up!

Use an old flash drive that you don't need anymore to be the ultimate backup solution!
 
Remove these adsRemove these ads by Signing Up

Step 1: First...

Picture of First...
Open up notepad and click "Saves as..." and click all files, then save it as "backup.bat"

Step 2: The code...

Picture of The code...
Now you need to type the following(This works with Windows vista, make your own script for XP):

@echo off
copy C:\Users\%username%\Desktop\*.txt txt
copy C:\Users\%username%\Documents\*.txt txt
copy C:\Users\%username%\Desktop\*.doc docs
copy C:\Users\%username%\Documents\*.doc docs
copy C:\Users\%username%\Desktop\*.jpg images
copy C:\Users\%username%\Documents\*.jpg images
xcopy C:\Users\%username%\Pictures images /S

All @echo off does is remove unwanted things when it runs, If you want a good explanation learn batch.

The copy command is used like this:
copy [source] [destination]
here is an example:
copy C:\mystuff mystuff
That will copy it to a folder called my stuff where the batch file is.
So if the batch file is on C:\backup it will copy it to C:\backup\mystuff

The xcopy command is just an advanced copy command. It is used just like copy but when you add /S to the end it will copy all sub directories. So if I copy something from the pictures folder and inside there I have a folder called "Spring 2009" It will copy that folder too.

Next is %username% it will just get your username. So if your username is bob it is just like typing: C:\Users\bob\Pictures

The *.doc or *.txt or *.jpg is just so it will copy anything that has .whatever
If i do *.txt it will copy blah.txt hello.txt or anything with that extension

The last thing:
So now you know how to backup your own things. You can use what I typed up there to back up pictures, documents, and text files, Or make your own script to backup anything.


Step 3: Set it up to auto run

Picture of Set it up to auto run
To make it run right when you plug it in make a new file and put this in it:

[autorun]
open=backup.bat

Save it under all files and name it "autorun.inf"
richardjw5 years ago
I have been using a trick like this for a few years, I learnt all my computer tech stuff back when DOS had to be installed before you could then install windows, so that was a little while back! I actually added a menu there as well so u could select certain things to back up, and it worked very well - it was quite amazing to amount of things you could do with DOS and a decently programmed batch file (I even created a home alarm system that worked from a 286 and the parallel port)! Funnily enough though, I was reading that windows 7 wont allow autorun, as it is one of the major causes of virus and trojans in machines these days, according to microsoft, so I dont know how thats going to work for them - I mean, I would prefer to beef up the security in the correct manner than get rid of a useful tool like autorun (thats like telling a fat guy not to bother going on a diet, just wear bigger clothes)! Keep programming! R (",)
karossii5 years ago
"This works with Windows vista, make your own script for XP." "If you want a good explanation learn batch." You should be a bit nicer about this. Perhaps give links to other instructables out there with this information (yes, your 'ible has been done before... for both XP and Vista!) Aside from putting up redundant information, you com across as rude in doing so. Other than that, this could be a good instructable. 2 stars.
Bongmaster5 years ago
nice and informative :) simple to do too.
Zibodiz5 years ago
Good 'ible; straightforward, well documented, and something everyone needs! Oh, and I love that it involves DOS! ~cheers
dabomb1022 (author) 5 years ago
Thanks I wish it had a higher rating though
ROFL!!! got first coment Nice ible +1