Solved

Auto copy from disk

Posted on 2010-11-19
4
926 Views
Last Modified: 2012-05-10
I have a .vbs script that executes a batch file silently to copy files from a usb disk to my hard drive.  Is it possible to run this process automatically when usb disk is inserted without an autorun.inf on the disk itself and without any user prompts.  How can I also tel my batch file what the drive letter of the inserted disk is?
0
Comment
Question by:Psyco_Sid
  • 3
4 Comments
 
LVL 54

Expert Comment

by:Bill Prew
ID: 34176041
If I understand you correctly, and you are looking for a way to have something running on the PC that takes action each time a USB is inserted, then here's a link to a sample.  It's NOT easy code, but the key technique is included.

http://www.akaplan.com/blog/?p=415

~bp
0
 
LVL 54

Accepted Solution

by:
Bill Prew earned 125 total points
ID: 34176046
(take the USBMonitor.vbs link from that page above...)

~bp
0
 

Author Closing Comment

by:Psyco_Sid
ID: 34176930
I tested the script as is on my windows 7 PC and it works like the original writer intended.  I just had to take out the e-mail part as the code does not handle authentication.  I'll see about adapting the code to my needs on Monday.  Looks like problem solved!! Thanks
0
 
LVL 54

Expert Comment

by:Bill Prew
ID: 34179768
Cool, hope that works out for you.

~bp
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question