AppleScript to unmount specific disk image when two have the same name

2 Disc Images with same name, different drives


I have 2 disc images (.dmg) 1 on Macintosh HD and another on an attached external drive.

I would like to know if there is a way to AppleScript the .dmg from the external drive to unmount it and leave the internal alone.


I don't know how or if I can incorporate the path of the external .dmg in a script to unmount it specifically.

I do not want to change the names.


Thanks

iMac (2017 – 2020)

Posted on Sep 6, 2026 7:06 PM

Reply
3 replies

AppleScript to unmount specific disk image when two have the same name

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.