1

How do I write a batch script to copy files from directory to a USB. I have a set of computers that I need to copy some files on a USB for backup purposes.

I want to plug the USB drive into the computer and run the script and get the docs copied.

example

D: Programs/test/test1 Inside test1 there is a bunch of files but I only need one from there to be copied into a usb. under this directory f: computer1/test/test1

  • Is [this](http://stackoverflow.com/q/10868613/3775798) what you're looking for? – Knowledge Cube May 19 '17 at 18:59
  • 3
    If you cannot guarantee your USB drive will always receive the `F:` drive letter allocation you may need to give that drive a known label or ensure it has a unique file or folder you can use to reference in your batch file. Most of the code I've seen to detect USB drive letters is either inaccurate and/or requires elevated privileges. Take the easy route unless your distributing your batch file to other users. – Compo May 19 '17 at 20:38
  • Please note that https://stackoverflow.com is not a free script/code writing service. If you tell us what you have tried so far (include the scripts/code you are already using) and where you are stuck then we can try to help with specific problems. You should also read [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask). – DavidPostill May 20 '17 at 16:11

0 Answers0