Copying files from hard drive to USB

Status
Not open for further replies.
How can I make USB automatically, when inserted, copy desired content to USB using only autorun.ini and .bat files?
For an example: When I plug USB, i want to automatically start copy in background D:\Pictures to USB.
 
I'll assume you know how to create the batch file, make sure that batch file is on the USB drive, most USB drives have an option to run a file when inserted (my Sandisk Cruzer does), select the batch file and you should be all set.
 
OK, to create the batch file, simply create a text document which you will save as a "whatever.bat"

The batch file will look like this:

copy d:\pictures\*.* f:\

D:\pictures is the 'from' directory, f:\ is the 'to' directory (you'll need to substitute for the correct drive letter). This won't work if you're copying the same content to multiple drives however, in that case, the batch file would need to be on your HDD, and you would have to run it manually everytime you insert a usb stick.;)
 
for your personal system, the autorun may work well for you.

As a general solution to copy from any system to which the device is attached,
this will not be 100% successful. GPO policies can disable all autorun features and
there are means to disable the USB for either read, write, or both for security reasons.
 
Status
Not open for further replies.
Back