I often have to copy large files over our WAN that can take a really long time.

These files are more updates than anything else... but there are multiple files.

Right now, I have a bunch of scripts that map the drives, copy over the necessary files to the correct directories and all is well. I schedule the scripts to run at different intervals. I have about a dozen servers that need to be updated in this manner. Sometimes the script fails. It fails mostly when the files that are being copied are over a couple hundred MB.

I was thinking about other media that I might want to use... possibly USB flash drives.

The flash drive will automaticlly mount but I am unable to get it to autolaunch the scripts.

I've tried the autorun.inf file but that doesn't seem to work.

What I want it to do...

Insert the flash drive, the autorun.inf will launch the scripts.

After the scripts have been completed. I want to launch another script (called by the scripts that were just run) that will basically do a tree on a specific directory, then a dir with some switches to output the info I want and store it on the flash drive. While I'm at it, I'm going to run a couple of audit programs that will run in "silent" mode so there is no user interaction required. The report will also be stored on the flash drive. After I get the flash drive back the following day, I'll have all the info I need.

I have no problem writing the scripts... but how can I get the flash to mount and autolaunch the scripts with no user interaction?

I was thinking about scripting them and putting them on a CD, so I can send the CD to a remote site and have a trusted person put the CD in and the batch file would execute automatically updating the necessary files. But I can't get reports to be stored on the media because it is read only... so CDs are out.

If I really had to, I can use the CDs, run the scripts and the remotely grab the reports over the WAN. I was just thinking since I have all these flash drives... I might as well use them.

While I'm thinking about this... is there any way to close a file while it is in use?
Sometimes the scripts fail because someone forgot to close out a program that is running from the server. Normally this is not a problem because of logon time restrictions and the server will kick the user off and kill files that are in use... but some people at the remote sites need 24/7 access because of their job requirements and work all hours of the day/night.

I know I can use mmc to connect to the server and close the open files... but is there a way to do that from within a script? I've been using batch files because they are the easiest and can do exactly what I want them to do.