Eject Disks

Script Cream

Convince Finder to eject disks

Eject Disks 0.4

Leopard sometimes can be a little reluctant to eject disks and disk images in the Finder.  You can click the eject button in the Finder sidebar, drag the disk to the Trash or right-click and choose Eject, but Finder just silently ignores you.  You can open Disk Utilty and eject it fine through there (unless there are files open on it of course).  This script is so you can eject troublesome disks quickly and easily even in Finder refuses to, and can also tell you which applications are stopping the disk being ejected as opposed to the Finder’s “something is open on that disk, but I’m not telling you what”!

Update: See also What’s Keeping Me and WhatsOpen for alternative open files notifiers, as featured in MacWorld here and here.

Tested on:

  • Mac OS X 10.4 (Tiger)
  • Mac OS X 10.5 (Leopard)

Licensed under the GPL. Download the Eject Disks 0.4 script application (zip).

Changelog:

  • 0.4
    • Fixed drag and drop and Finder selection.
    • Added more timely dialog boxes using CocoaDialog.
    • Changed Finder selection options so you can choose to do a normal scan if there is an inadvertent Finder selection.
    • Fixed bug parsing optical volumes with spaces in the name so they don’t appear twice.
    • If a disk and it’s subvolume(s) are selected for ejection, now subvolumes are skipped instead of throwing errors.
    • Removed official Tiger support since I no longer have a Tiger test system.
  • 0.3
    • Changed disk discovery from relying on Applescript to parsing using System Profiler and diskutil on the command line to reveal more stuck and unmounted disks.
    • Drag and drop and Finder selection eject is broken for disks, but works for network volumes at the moment, to be fixed in a future release.
  • 0.2
    • Added network volume support.
    • Changed disk discovery from using Finder in applescript to using System Events (so no throwing error tantrums anymore if there are no ejectable disks, just a blank list).
    • More robust error parsing, won’t return a success on a failure as often.
  • 0.1
    • Initial release.
  1. Hagbard C
    December 14, 2008 at 6:35 pm

    Download link is broken 😦

  2. Henry Bowman
    January 2, 2009 at 9:14 pm

    Your link is 404.

  3. January 3, 2009 at 2:02 pm

    Apologies for the broken links all over the place. My hosting provider moved to a new platform and deleted all the old content! Luckily I had a backup of the posts, which I set up here, but haven’t had a chance to complete the move. The download links here are fixed now and I’ll be fixing the rest of the transitional errors in the next few days.

  4. Dr. T
    August 22, 2009 at 2:59 am

    This is worthless if the CD or DVD isn’t showing up on the desktop. The script result is: “Error: No ejectable disks.”

    • August 22, 2009 at 10:20 am

      Yes, unfortunately it will only work on mounted disks, those that are in the drive but not mounted won’t be detected. I’ll see if I can put in a workaround for that, in the meantime you can use Disk Utility or if worse comes to worst restart the computer and hold down the mouse button.

      • August 31, 2009 at 9:07 pm

        Eject Disks 0.3 is now out and should now address disks that the Finder can’t see but are still physically present.

  5. September 19, 2009 at 6:52 pm

    the disk utility and eject option worked for me. thanks! i was pulling my hair out.

  6. Marc Shaw
    October 15, 2009 at 8:16 pm

    Hey, I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say GREAT blog!…..I”ll be checking in on a regularly now….Keep up the good work! 🙂

    – Marc Shaw

  7. ronnie
    September 12, 2012 at 1:59 am

    does this work for snow leopard? if so, can you explain in low tech language what to do? optical drive is whirring and not ejecting discs. thanks.

  1. October 30, 2009 at 12:13 am

Leave a comment