• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UUID of a volume
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UUID of a volume


  • Subject: UUID of a volume
  • From: Lists <email@hidden>
  • Date: Sun, 16 Mar 2014 12:34:04 -0700

I have a working script, but I'm well out of my comfort zone with shell scripting. Is it possible to do this with pure AppleScript?

tell application "System Events"
set nm to name of every disk
set myVolumes to items 1 thru -3 of nm
end tell
set choice to choose from list myVolumes with prompt "Choose disk."
if the result is not false then
set DiskName to choice
set shellScpt to "diskutil list | grep '" & DiskName & "'"
set whatItem to (do shell script shellScpt)
set DI to last word of whatItem
set shellScpt2 to "diskutil info " & DI & " | grep 'Volume UUID:'"
set UUIDstring to do shell script shellScpt2
set volUUID to last word of UUIDstring
end if

Thanks
J
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • ID of a Disk
      • From: Luther Fuller <email@hidden>
    • Re: UUID of a volume
      • From: Doug McNutt <email@hidden>
    • Re: UUID of a volume
      • From: Christopher Stone <email@hidden>
    • Re: UUID of a volume
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Script Debugger - Save Session
  • Next by Date: Re: UUID of a volume
  • Previous by thread: Script Debugger - Save Session
  • Next by thread: Re: UUID of a volume
  • Index(es):
    • Date
    • Thread