0

I have to write a batch file which does the following: When a pen drive is inserted it has to copy all the *.mp3 files from the pendrive to my C drive. I thought I can achieve this by running a batch file which runs as a windows service or something, as I don't want the user to know that the mp3 files are being copied.

Thanks a lot!

user unknown
  • 35,537
  • 11
  • 75
  • 121
Zer0
  • 2,171
  • 3
  • 17
  • 18

1 Answers1

0

See "How can I run a batch file in the background (no windows displayed)?" on how to start a hidden batch file in the backgrond. To detect a pen drive, you can detect if a drive letter exists, see "How do I test if a file is a directory in a Batch script?", or How can I detect the drive letter of a booted USB drive from script?

Community
  • 1
  • 1
wimh
  • 15,072
  • 6
  • 47
  • 98