Tuesday, March 18, 2008

applescript with rsync and an external HDD

I've been working on a solution for easily syncing my files to an external hard drive for a while now. I'm almost there, but I thought I'd post what I have so far. I've culled ideas from many sources, specifically here, here, and here. Just one problem. I'd like the process to open a terminal window and echo the file copying progress while it's doing it so I can have an idea how much is being copied. The way this script works I don't know how long it's going to take, it just reports with a dialog when it's done. Hence the ineffectual options in the shell script--I would like them to be showing what they are doing. Here's the script:
display dialog "Backing up now."
do shell script "rsync -rlpt --progress --stats ~username/ /volumes/macdrive/username"
display dialog "Your backup is done."
If anyone knows how to make it echo the progress and stats, give a holler.

1 comment :

Guy said...

you need to tell terminal to run te script. Then you see a terminal windows with the progress