Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

toddburch

macrumors 6502a
Original poster
Dec 4, 2006
748
0
Katy, Texas
Could an Applescript handle it?

Here's the potential situation. A conference is coming up and I want to hand out little logo-ed flash drives preloaded with my software. On my Mac, I have 2 USB ports on the keyboard, 2 on the front of the tower, and I think I even have a spare hub around here somewhere.

I'm wondering how fast I could insert a flash drive, have the software copied to it, and (logically) ejected, utilizing all available USB ports in a named fashion.

So, I envision something like this:

Start an applescript or some other process- it's now waiting for any volume mount action. I insert a USB flash drive on the left side of my keyboard. The script sees the volume and starts copying a predetermined folder to it.

I insert the next flash drive, on the right side of the keyboard, and same thing. Then, on the top port of the front of the tower.

About that time, the copy to the first USB drive is done. The script logically ejects that USB drive and then it prompts me to remove the "left keboard usb drive and to insert another".

Is this possbile with an Applescript? I think the key points here are:

1) named USB ports
2) multi-tasking the copying of files
3) automatically "ejecting" the drive

Todd
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,566
Could an Applescript handle it?

Here's the potential situation. A conference is coming up and I want to hand out little logo-ed flash drives preloaded with my software. On my Mac, I have 2 USB ports on the keyboard, 2 on the front of the tower, and I think I even have a spare hub around here somewhere.

I'm wondering how fast I could insert a flash drive, have the software copied to it, and (logically) ejected, utilizing all available USB ports in a named fashion.

So, I envision something like this:

Start an applescript or some other process- it's now waiting for any volume mount action. I insert a USB flash drive on the left side of my keyboard. The script sees the volume and starts copying a predetermined folder to it.

I insert the next flash drive, on the right side of the keyboard, and same thing. Then, on the top port of the front of the tower.

About that time, the copy to the first USB drive is done. The script logically ejects that USB drive and then it prompts me to remove the "left keboard usb drive and to insert another".

Is this possbile with an Applescript? I think the key points here are:

1) named USB ports
2) multi-tasking the copying of files
3) automatically "ejecting" the drive

Todd

I think there are companies that will sell you USB sticks, with any branding that you want, and with any data that you want preloaded, for reasonable prices. Probably cheaper and easier than anything you can do yourself.
 

lilrichie

macrumors regular
Feb 13, 2007
126
0
I am with Gnasher on this one by the time u have executed the script mounted the drive copied the files and then had the drive un-mount again u are looking at 2-3 mins that is alot of time depending on where u do this it could also be costly.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
You could probably attach a folder action to the /Volumes folder that would detect the USB drive (if they're all the same, you could probably just do a size comparison for now) and then copy files to it. However it'd probably be faster to have the AppleScript execute some shell script that handles identifying the USB drive and copying of files.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.