Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a Windows 7 user. I have 1 to 2 files that I modify daily o my PC, it is kind of a To DO/Task type file that uses a program called MyNotesKeeper. ( ) The files that this program uses are .mnk files likefilename.mnk

These files are really important so I need to make sure I have a backup copy, like I mentioned though I am constantly changing the contents of these files, everyday. I really don't want to have to copy/paste this file to my USB thumb drive every day. But I also don't want to have to install another program to keep it synced if there is a better way to do this task without using a syncing program?

I would like the best way to automate this task without requiring a bunch of programs for syncing. Is there a simple script I could use that would make sure any changes to the file on my PC are pushed to my USB drive, even if it only happened like 1 time per day?

share|improve this question
up vote 3 down vote accepted

Create a new txt document and save it as "backup.bat". Open it up and paste in the following:

SET SOURCE=C:\myfolder
SET BACKUP=E:\backupfolder
xcopy "%source%" "%backup%" /E /Y

Change the source and backup lines to match the folder path to where things are stored.

Finally create a scheduled task to run once a day that runs this script.

This is the easiest way to save a backup copy of your data. It is super simple, has no fault tolerance, and uses nothing but software available in a basic windows installation. It's quick, it's dirty, but it gets the job done. It will overwrite anything in the destination source and will fail if the drive letter changes.

I still recommend that you go with an actual software solution. It'll be a lot more robust and you don't have to learn how to write scripts.

share|improve this answer
I haven't tested this yet, but if it works, this is brilliant and I see so many uses for this, thank you!!! – CodeDevelopr Mar 16 '12 at 9:49
Just tried this out, works awesome on my test so far. Do you know, is it possible to basically duplicate what you posted, several times with different paths and xcopy commands to backup several directories all within one .bat file? – CodeDevelopr Mar 16 '12 at 10:00
Just copy and paste the code multiple times and change the first two lines to match what you want. If you are looking to get into a more robust solution, I would look into Powershell scripting. It gives you a lot more power and comes with a standard install of windows 7. – Doltknuckle Mar 19 '12 at 22:28
Also, ROBOCOPY is an amazing program that comes with the microsoft windows resource kit. This exe gives you mirroring features and doesn't require an instal once you get it out of the resource kit. – Doltknuckle Mar 19 '12 at 22:31

You can try Microsoft Synctoy which is a free software to easily synchronize two folders on your computer / usb key.

There are others paid software such as GoodSync, PureSync which are also good. I use PureSync. It's also free for personal use.

Tell me if you have a special requirements regarding your choice.

Edit : If I can add something... I checked the software that you used. And I think you might try "Evernote" which is hightly-compatible and it will solved you synchronisation problem.

share|improve this answer
But...the special requirement already mentioned in the question was that CodeDevelopr doesn't want to install a syncing utility. ;) – rob Mar 11 '12 at 0:06

Custom Script

You could create a .bat or .cmd script to copy the file from your hard drive to the USB drive. If you get fancy, you can even rotate the backups. Then you could either schedule the script to run automatically at certain times, or you could run it manually by double-clicking on a shortcut or using a hotkey (which is assigned to the shortcut).

Older versions of Windows allowed you to specify an autorun.inf file in the root directory of a removable drive. This file allowed you to specify an icon file for the drive, as well as a program to run automatically when the drive was mounted. However, Microsoft removed that feature for removable drives with the release of Windows 7 (probably because it was an enormous security hole).

Windows Backup

You could also use Windows' built-in backup program to automatically backup your MyNotesKeeper files every day at a specific time, assuming the USB drive is usually plugged in at that time. (If this is your home computer and you decide to always keep the thumb drive on your keychain plugged into the computer at night, you'll never have trouble finding your keys in the morning!)

Other backup alternatives

  1. If your only objection to installing a program is that you don't want to have to install it on every computer you use, you could install PortableApps on the USB drive along with either the included backup utility or a third-party PortableApps-compatible backup utility like Toucan. To make PortableApps run automatically when you plug in the flash drive, you'll need to set up a helper utility like USBDLM or the AutoRun/AutoPlay utility, both mentioned here.
  2. CrashPlan, Mozy, or some other online backup service - the nice thing about these is that you don't even have to think about backup up the's just done automatically in the background. Some even let you use your USB drive or another computer (either your own or a friend's) as the backup target. (I use multiple backup targets for my important stuff--CrashPlan's online backup service, along with a few other computers.)
  3. DropBox, SugarSync, Windows Live Mesh/SkyDrive, etc. - Any of these file sync services will backup your files online whenever they change, as well as sync them automatically to any other computers that you use.
share|improve this answer

Toucan is a great utility that will sync, back up, and otherwise move your data around in a variety of ways. It integrates nicely with the PortableApps suite, so you can have it installed just on your USB drive. Most importantly, you can script it to run automatically when your USB drive is inserted.

Toucan isn't as fast as popular alternatives like SyncBack; the main selling point is that it doesn't need to be installed on each machine.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .