Automatically Backup Your Flash Drive on Windows
December 21, 2007 – 9:20 pm
Yesterday I made an automatic backup script for external drives on the Mac. A few of my friends have wanted a Windows version, so here it is:
Step 1: Create a file called backup.bat in the root of your flash drive. Use Notepad, or any other editor. Copy and paste this code into it, changing “Path” with the path you want (Leave the quotes in, they do matter).
@echo off
echo ----------------------------------
echo Backing up your flash drive...
echo ----------------------------------
echo.
echo.
xcopy "*" "Path" /Y /E /R
echo ----------------------------------
echo Backup Complete!
echo ----------------------------------
echo.
Pause.
Step 2: Create a file called autorun.inf on the root of your flash drive. Copy and paste this code into it:
[autorun]
action=Backup
open=backup.bat
labelBackup
includeRuntimeComponents=True
Step 3: ???
Step 4: Profit
You’re done. The only issue is that you now have to watch the dreadful commandline copy everything over, and you have to select “backup” everytime you plug in your drive. Also, unlike the Mac version, Windows copies all the files over every time (Because it does not have rsync installed) so it will cause a bit of lag depending on the size of the drive. On the plus side you don’t have to install anything.
Kudos to Sandstorming for the know-how to do this.
-Amir