I know this question has been asked and discussed repeatedly throughout these forums, and believe me, I have searched for the answers and I've tried my best to get the job done without posting my own question about it, however due to the fact that my Apple Scripting expertise is completely nonexistent, my best attempts have failed in every respect...
Perhaps somebody can help me figure out how to accomplish the task of automounting my chosen backup hard drive prior to running SuperDuper to create a backup, and automatically on mounting the same drive after SuperDuper has finished backing up.
This is about as far as I've gotten in the process:
Code:
-- SuperDuper! scheduled copy script template (c) 2005-2008 by Bruce Lacey. Published by Shirt Pocket.
-- Script by Dave Nanian and Bruce Lacey
beforeRunningCopy()
tell application "Finder"
if not (exists the disk "Macintosh HD Clone") then
try
do shell script "diskutil mount `disktool -l | grep 'Macintosh HD Clone' | sed 's/.*\\(disk[0-9s]*\\).*/\\1/'`"
end try
repeat while not (exists the disk "Macintosh HD Clone")
delay 1
end repeat
end if
end tell
end beforeRunningCopy
on afterRunningCopy()
tell application "Finder"
if (exists the disk "Macintosh HD Clone") then
eject "Macintosh HD Clone"
delay 2
end if
delay 2
end afterRunningCopy
For some reason, when I press the compile button in the script editor to check for errors in the way the script has been written, I am consistently getting the following error message:
'Syntax Error' - Expected end of line, etc. but found identifier"
It then highlights the word "
beforeRunningCopy" in the "end beforeRunningCopy" line of text in the script above (and it does the same thing for "end afterRunningCopy")
For the life of me I cannot figure out how to fix the script so that it doesn't result in this error message!
Any assistance that anyone can offer to help me accomplish the task of Mounting my chosen backup (clone) hard drive before SuperDuper performs its cloning procedure, and un-mounting it after it has done so, would be greatly appreciated!
Thanks, and I look forward to your responses!