Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (*
- Original author:
- Constantinos C. Neophytou
- http://www.cneophytou.com/2007/03/06/automating-backup-of-flash-drives/
- Amended original script to work with OSX Mavericks - skororu.deviantart.com
- *)
- property backup_script : "rsync.app"
- property dialog_timeout : 30
- on adding folder items to this_folder after receiving added_items
- try
- tell application "Finder"
- try
- repeat with i from 1 to number of items in added_items
- set this_item to the item i of added_items
- if (kind of this_item is "Volume") then
- tell application "System Events" to set thefullpath to (POSIX path of this_item) & "/" & backup_script
- if exists thefullpath as POSIX file then
- set backupFile to POSIX file thefullpath as alias
- open backupFile
- end if
- end if
- end repeat
- end try
- end tell
- end try
- end adding folder items to
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement