Automating USB pen drive copying
February 16, 2005 5:23 AM   Subscribe

So I have a big conference coming up and we’re considering giving each attendee a usb-drive with all the presentations on. The problem is that if I don’t find a way to automate the copying of files I have to do it manually by myself! (+)

Hence my question: is there some software out there than can automatically copy a folder of files to a usb-drive every time one is inserted in to a computer?
posted by bering to Computers & Internet (18 answers total)
 
So you're planning on sitting and inserting usb drives into a computer one by one anyway? just do a copy command from the command line, then hit F3 Enter every time you put a drive in (or whatever F key fills in the previous command, I forget).

If it's not too late, or for future adventures, check with the supplier you're getting the drives from. They may be able to copy an image into the flash memory in production, if the quantity is sufficient. Although I know that many presentations will be unfinished until the morning of the conference, which probably makes this impossible.
posted by stupidsexyFlanders at 5:31 AM on February 16, 2005


The thing is, if I find some sort of semi-automated method I don't have to do all the work myself, then I can distribute it among my colleagues...
I'm looking for some sort of script or program that basically goes

if [usb present]
then copy c:\presentations

...or something

It's already been checked with the supplier, they won't do it. Besides, as you correctly point out, we don't have the presentations yet.
posted by bering at 5:49 AM on February 16, 2005


I've often found that doing these things manually is quicker than finding a solution, tweaking it to work properly and putting it in place. If you have thousands of USB devices to do, perhaps not, but don't underestimate what can be done in a couple of hours (boredom withstanding).

On another note, test test and test again to ensure that you have all the files you want ready in one folder. On more than one occasion I have copied files to multiple destinations, only to find out that I missed a file and have had to had to start again from scratch... Don't fall foul of that.

Alternatively, provide a PC or workstation and allow attendees to copy over the presentations they require. Or put them on a website somewhere and let them take the ones they want before or after the event.
posted by gaby at 6:02 AM on February 16, 2005


If the USB stick always mounts as the same drive letter then you could write something that checks for the existance of one of the files on, say, F: and if it does not exist then that would imply that:

1. Drive F is available (you have the USB stick in)
2. It's not had the contents copied to it

and then you could copy the files over.

Dead easy to do for UNIX and in VB for windows - but you'd probably want to use Windows Scripting or whatever it is called - which is something I can't help you with I'm afriad.
posted by ralawrence at 6:05 AM on February 16, 2005


I believe that you could tweak a Linux distro to copy the files when you insert the device. It would be part of the usb scripts in /etc/init.d. Probably something like:

#!/bin/sh

echo "keydrive inserted"

mount /mount/usb /dev/usb
echo "Drive mounted"

cp -r /home/me/presentations /mount/usb
echo "presentations copied"

umount /mount/usb
echo "Complete. Please remove keydrive."
posted by gaby at 6:06 AM on February 16, 2005


Interesting suggestions. I should probably have pointed out that I am on a windows XP box (and that I don't know anything about VB) Maybe someone else has already written something like the script ralawrence suggests?
posted by bering at 6:20 AM on February 16, 2005


Would your co-workers be able to use a batch file like this to do the file sync?
posted by dflemingdotorg at 6:30 AM on February 16, 2005


Download ActiveState Perl.

#!/usr/bin/perl

while () {

if (not(-e "f:\somefilethatshouldbeonthedisk")) {

system ("copy c:\foo\*.* f:");
print "Completed. Insert next drive.\n";
}
}

...or something like that.
posted by IshmaelGraves at 6:37 AM on February 16, 2005


There ARE companies who will do this for you. My marketing team at work is looking into it. Email me (addy is in the profile) and I'll put you in touch with the folks who can get you pricing and stuff. There are MANY people who do this.
posted by TeamBilly at 6:59 AM on February 16, 2005


The programming option is pretty much out, as well as looking for other companies.

I checked out dflemingdotorg's suggestion, and actually got it to work fairly well. But as I've spent the last couple of hours looking in to different kinds of solutions I've realised that gaby was probably right in his inital response.... it is quicker to do it manually, although a lot more boring :-) I need a solution that is either totally automated or nothing at all.

So thank you for all the responses, but I'm going to go for the mindnumbing copy/paste windows explorer solution and just thank the computer gods that USB 2.0 has been invented.
posted by bering at 7:57 AM on February 16, 2005


Boredom can be made less boring with:

a) Music
b) People to talk to
c) Porn.

Happy to help :)
posted by gaby at 8:04 AM on February 16, 2005


Check out this page under the heading "Save [sic] removal".

I've used deveject myself, and it comes with C++ source, though as the page notes it sometimes falsely reports success. You want deveject or unmount to make sure the data is flushed (actually written) to the USB drive.

That, as a part of IshmaelGraves's perl script will likely work. If you don't like ActiveState perl, there's always the handy for so many things cygwin.
posted by orthogonality at 8:07 AM on February 16, 2005


In windows, if you drag a folder between drives, the default behavior is "copy". So if you put all the required files in one folder and leave a window open with that folder in it, all you have to do is

1. Insert drive
2. Drag folder to drive
3. Remove drive, repeat

Unless you find a way to automate the physical plugging-in of the drives, I'm failing to see how you could significantly increase the speed of this process. (Though aren't there devices that let you plug a whole bunch of drives in at once for just this sort of mass copying? Sorry I don't have the details...)
posted by squidlarkin at 8:07 AM on February 16, 2005


I would think having a USB hub would make this go a little faster.
posted by achmorrison at 8:34 AM on February 16, 2005


Do it at the command prompt, and hit the 'up' arrow key to get the last command. Something like this:

copy *.* f:
(wait for copying to finish, insert next key and wait for mount. Hit the up key and press enter to copy again.)

Pretty easy, still mindnumbing.

Oh yeah, you'd have to execute that command from the directory with all the files to be copies. And it won't work with subdirectories, you'll need some switch for that.
posted by sid at 8:42 AM on February 16, 2005


I loaded up 100 USB files with a whole bunch of content by getting a 10-port USB hub, hooking up 10 drives at a time, running a batch file that said, basically:

copy c:\source\*.* f:\

for each of the drive letters from f to o, and then did that 10 times. Took me about an hour and a half.
posted by anildash at 8:59 AM on February 16, 2005


anildash, that is definitely a good way to go; get 'em done in batch!

If you're still looking for automation tools, the few that I found include these (AutoMove, Pen Drive Manager, and MyTrigger). All 3 are shareware; all 3 have 30-day trials.
posted by bachelor#3 at 11:29 AM on February 16, 2005


Why not just press a CD and also give them a free, unopened, blank USB key as a gift?
posted by delmoi at 7:20 AM on February 17, 2005


« Older Why does the first tick take so long?   |   What is your favourite online music review site? Newer »
This thread is closed to new comments.