Copying files from hard drive to USB

By stanko1610 ยท 4 replies
Aug 16, 2009
  1. 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.
  2. strategic

    strategic TechSpot Paladin Posts: 1,020

    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.
  3. stanko1610

    stanko1610 TS Rookie Topic Starter

    But what should I write in that batch file? Thanks
  4. strategic

    strategic TechSpot Paladin Posts: 1,020

    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.;)
  5. jobeard

    jobeard TS Ambassador Posts: 11,165   +986

    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.
Topic Status:
Not open for further replies.

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...