After seeing scripts for automated rsync set up I thought it could be a really easy way to update files but it does quite do what I want it to do. So I have posted this a couple of places but with no responses. So if anyway can help that would be great.
I am trying to develop an applescript that allows a user to put ANY USB pen drive, DVD, CD or external hard drive into a local mac which will then trigger a script to look for the folder “media” in the root of the removable drive or disk. If the folder is there it will bring up a dialogue that will ask the user if they want to update the media on there local machine. They will have 3 options.
Add this will add the files from “media” on the removable drive to a folder on the local mac.
Replace will delete the contents of the folder on the local mac and will then write the files from the removable drive to the local mac.
cancel will cancel the process.
once this is all done the mac ejects the disk and restarts.
I have been trying to adapt the automatic sync scripts that use folder actions on /volumes and rsync but I don’t seem to be able to get them to work, it would be great if someone could help me out. What is really important is that it has to be any drive, I could use Do Something When but I would then need to know which disks I would be using.
So far i think I know how to do the buttons and things but I am stuck with dynamically get the name of the new volume added (when the folder action activates), I have tried to pull apart your rsync script as that searches for the rsync file in the root but I can’t get it to work.
Cheers for any help
Steve