1

I have a file that I want to have automatically backed up onto my USB drive like with a networked drive sync operation how would I be able to set this up?

I've tried to look in the properties for anything regarding backup but cannot seem to find anything.

2
  • you can do a scheduler to copy it or even a batch file that could be run by you, are you looking to do more than file copy on a periodic basis?
    – skv
    Nov 30, 2014 at 12:30
  • its just when i insert a certain USB device into the machine i want to copy a folder straight over onto that device automatically when its inserted... Like and iPod sync with iTunes operation. Dec 4, 2014 at 12:17

1 Answer 1

1

You need to run a batch file, this can be either initiated at the PC end for which you need a pre-made tool, similar to one offered in http://www.dirsyncpro.org/ (No Affiliation nor have I tested this personally).

However if you dont want to use a tool, you could do it from the USB drive end, which means as soon as a specific USB is inserted, it will "look" for a folder in your hard drive and copy it onto itself (overwriting any previous version without asking)

xcopy /e /y c:\<yourfolder>\*.* .\dir_on_usb_drive

xcopy is actually deprecated now in favour of robocopy which is not the scope of this answer, but basically you need a recursive copy command that can copy the entire content (robocopy also offers resumption and retrying partially copied files which would help you)

Once you have the command ready you can add it to a batch file and create an autorun.inf file inside the USB (this is one structure - Warning Untested Script ahead)

[autorun]
open=<yourbatchfilename.bat>
action=Backup Your Files

You will now see this as an option in the autorun menu of windows when you insert the USB drive (with description as "Backup Your Files" which was provided in autorun file.

You must log in to answer this question.

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