Hey Guys and Gals.
I think that I can do this using AppleScript(s) but not sure how.
When I plug my usb key drive, I want it to automatically copy a few items over, like a few files I work on almost everyday.
Any suggestions on the best way to do this?
cheers
J-E-O
Comments
The only solutions would be to create a daemon process that would watch /Volumes for the device to show up, or play with the kext that serves as the driver for USB disk devices and put in a hook... not a trivial exercise.
My best advice would be to create an AppleScript or ".command" shell script that does what you want and manually trigger it. If you decide to go with the .command, I would advise looking into rsync.
Cheers, it's a bummer that i can't do it. I thought there might be something like watch folder typething.
Ill look into rsync.
thanks
(I don't know AppleScript so this is not specifically about that)
Originally posted by jon-e-orange
Hey Karl your becoming my one man answer shop lol
Cheers, it's a bummer that i can't do it. I thought there might be something like watch folder typething.
Ill look into rsync.
thanks
Hmmm.... what about Folder Actions? If one attached a folder action that is triggered when a new item is added to the /Volumes directory... well, unfortunately I can't test it now, my iBook just went away to Apple (the well-known motherboard bug "ate" it)
Greetings,
durandal
I used the new item alert folder action script and as soon as I added an extra drive (i tested with a floppy drive) the alert popped up.
I can now start work on my script
the next big thing is to one get the script to work when I use the key drive. I must be able to run only when specific volume name is added.
thanks
Originally posted by jon-e-orange
I must be able to run only when specific volume name is added.
That's easy. Look at scripts located in /Library/Scripts/Folder Action Scripts/ for examples. Basically, for a folder action script you have to add the on adding folder items to this_folder after receiving added_items handler, from which you can access the list of added items (added_items), which in your case is a list of folders, the names of which you should test against your USB drive's volume name.