Mac OS Volume UUID from Filemaker

This can be done using an Applescript to call the command line diskutil.

Here is the script I used:

Set Variable [ $DiskPath; Value:Let ( [
fullpath = Substitute ( Get ( FilePath ) ; "file:" ; "" );
delim = Position ( fullpath ; "/" ; 0 ; 2 );
path = Left ( fullpath ; delim )];
"'/Volumes" & path & "'"
) ]

Perform AppleScript [ Calculated AppleScript: "set cell \"DiskUUID\" of current record to do shell script \"diskutil info " & $DiskPath
& " | grep -h UUID:\"" ]

“DiskUUID” is the field name for the result..

This entry was posted in Filemaker, Mac Stuff. Bookmark the permalink.

Comments are closed.