ok, i have the name of a mounted volume. and is it possible to get the disk number (like disk2 (when you type mount in terminal)) from the volume name. in simpler terms i have the volume name and i want to use it to get the disk number.
set DskName to "theNameYouKnow"
set dl to last word of (do shell script "diskutil list | grep " & quoted form of DskName)
Returns the disk number. To see the whole line, leave out the “last word of”
cool, thanks it worked, but how would i get rid of the s3 part at the end, like i just want the disk number not the partition (s3)
set DskName to "yourDiskName"
set dl to text 1 thru -3 of last word of (do shell script "diskutil list | grep " & quoted form of DskName)