I’m trying to determine if a volume is mounted for a script. I’m using “list disks” because I’m using this script in Tiger. List disks will return a list as a result. How can I look for a certain volume name in the list and then display a dialog if it exists?
Thanks!
Model: MacBook Pro
AppleScript: 2.1.2
Browser: Firefox 3.6.3
Operating System: Mac OS X (10.6)
set all_disks to list disks
set my_disk to "Macintosh HD" -- replace "Macintosh HD" with target disk name
if my_disk is in all_disks then
display dialog my_disk & " is Mounted!"
end if