View Single Post
  #5  
Old 11-25-2009, 12:50 AM
Jack Mac Jack Mac is offline
Registered User
 
Join Date: Nov 2009
Posts: 6
OK, so I'm getting closer, but I need more help.

I found a unix script that will automount and I created an AppleScript, and then set up an iCal alarm to run it just before the SD backups are scheduled. It works. This is the AppleScript:

do shell script "BDISK=`/usr/sbin/diskutil list | awk '$3==\"ARCHIVES\" {print $6}'`;/usr/sbin/diskutil mount $BDISK"

The thing I'm still struggling with is getting SD to unmount the volume after the copy. I used the unmount version of the same script in the "Run shell script after copy completes" but I got an error message. Here are the last three lines from the log:

| 12:19:21 AM | Info | ...ACTION: Running shell script Un-Mount ARCHIVES.scpt
| 12:19:21 AM | Info | ......COMMAND => Invoking After Copy shell script: /Users/~/Library/Scripts/Un-Mount ARCHIVES.scpt
| 12:19:21 AM | Error | sh: /Users/~/Library/Scripts/Un-Mount ARCHIVES.scpt: Permission denied

Any idea what I'm doing wrong? I thought the problem might be that the script I'm using has an AppleScript wrapper. If that's the case, I'm not sure how to create a standalone shell script. My limited scripting experience is all with AppleScript.

Thanks
Reply With Quote