Tuesday, April 01, 2008

applescript with rsync (pt 2)

I've found a partial solution to my problem of making a good little app to back up my files to an external hdd. Now I have a really short little script that opens a terminal window and runs rsync:
tell application "Terminal"
activate
do script "rsync -rlpt --progress --stats ~username/ /volumes/macdrive/username" in front window
end tell

I still have a problem, though. I'd like it to logout of terminal and close the window when it's done. If I put a dialog so it doesn't close until I've clicked okay the dialog times out and the script stops running. So I have to look for a way to make the dialog wait indefinitely.

No comments :