I’ve got a cool little script for bulk engesting CDs. I am using it to copy about 500 CDs to a FW drive on our network.
Anyway, right now it is running as a Folder Action on the /Volume directory so I pops up whenever a CD is inserted. However, I would rather launch it, set the destination folder, and have the script detect when a CD is inserted rather than the OS doing it with the Folder Actions. That way I could release it to others and they might find some good use for it.
Any ideas on how to setup that kind of loop?
-- CD Archive Ingester 1.0 -- Copy a bunch of CDs or DVDs to another location (like an external FireWire Drive with minimal user interaction -- This is a folder action that is attached to the "/Volumes" folder. -- By T. Payton, onecreative.net on adding folder items to this_folder after receiving added_items try -- variables set archiveCD to "" set cdName to "" set destinationFolder to alias "OC Live Archive:" -- the path to the folder where you want your music stored set appTitle to "CD Archive Ingester 1.0" say "Yum. I've got the disk" without waiting until completion display dialog "CD Insert Detected. We are groving." giving up after 2 with icon caution with title appTitle -- get name of inserted cd tell application "System Events" set archiveCD to 1st disk whose ejectable is true and local volume is true set cdName to name of archiveCD -- set cdPath to path of archiveCD end tell -- now copy that CD to the destinationFolder tell application "Finder" -- set theCDRom to "OC Archive 2005.21:" as alias set theCDRom to cdName as alias if folder cdName of destinationFolder exists then display dialog "This CD is already loaded up. Sweet. Grab another while I eject this one. Hang tight let me eject it." giving up after 3 with icon stop with title appTitle else display dialog "Copying. This will take a while." giving up after 3 with icon caution with title appTitle with timeout of 2400 seconds -- 40 minutes try duplicate theCDRom to destinationFolder on error say "I've got a problem. Bad Disk." without waiting until completion display dialog "Thee was a problem with this disc. Please put it aside to manually copy. I'll eject it now." giving up after 3 with icon stop with title appTitle end try end timeout end if eject cdName say "Feed me another CD please." without waiting until completion display dialog "Please feed me another CD." giving up after 10 with icon caution with title appTitle end tell end try end adding folder items to