Thread: Scripts
View Single Post
  #6  
Old 03-16-2006, 07:28 AM
MarkW19 MarkW19 is offline
Registered User
 
Join Date: Mar 2006
Posts: 19
I've done diskutil mount disk0s5, and diskutil unmount disk0s5 in terminal, and both work perfectly.

However, my script doesn't appear to work (it won't mount Backup if it's not already mounted):-

on beforeRunningCopy()
tell application "Finder"
if not (exists the disk Backup) then
do shell script "diskutil mount disk0s5"
delay 1
end if
end tell

delay 2
end beforeRunningCopy

on afterRunningCopy()
tell application "Finder"
if (exists the disk "Backup") then
eject "Backup"
delay 2
end if
end tell

delay 2
end afterRunningCopy

What am I doing wrong?
Reply With Quote