• 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
Re: Unmounting a volume
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unmounting a volume


  • Subject: Re: Unmounting a volume
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 23 Feb 2015 08:43:56 -0600

On Feb 22, 2015, at 11:00 PM, Dave C wrote:

I want to unmount a volume, one of 2 on a hard drive. I have successfully 
unmounted the drive but, of course, this unmounts both volumes:

     do shell script "diskutil unmountDisk " & diskDev

How can I unmount just one volume?

I just looked at some of my code and I used the Finder to unmount a volume.

set diskAlias to my mountImageDisk(dropItem)
if not my TrashIsEmpty(diskAlias) then
....
end if
tell application "Finder" to eject diskAlias

The 'mountImageDisk' handler returns an alias to the mounted disk like this ...

set diskAlias to (POSIX file volName) as alias
return diskAlias -- an alias to the disk mounted from the disk image file

Does this work for any disk, not just for disks mounted from a disk image file ?
It ought to. Let us know.



 _______________________________________________
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:
    • Re: Unmounting a volume
      • From: Neil Laubenthal <email@hidden>
References: 
 >Unmounting a volume (From: Dave C <email@hidden>)

  • Prev by Date: Re: XML script library?
  • Next by Date: Re: Unmounting a volume
  • Previous by thread: Unmounting a volume
  • Next by thread: Re: Unmounting a volume
  • Index(es):
    • Date
    • Thread