eject partition
I am trying to eject partitions from my desktop if they exist. The following automator script does not execute reliably. Running as an AppleScript in Automator. It may eject 1 or 2 partitions and leave the third or if there are 2 mounted, it may just eject 1. Appreciate any help in reliably unmounting these partitions. Or any different way.
on run {input, parameters}
tell application "Finder"
if exists disk "A" then
eject disk "A"
end if
end tell
tell application "Finder"
if exists disk "B" then
eject disk "B"
end if
end tell
tell application "Finder"
if exists disk "C" then
eject disk "C"
end if
end tell
return input
end run
iMac Line (2012 and Later)