Skip to content

Instantly share code, notes, and snippets.

@cmod
Last active September 4, 2020 15:42
  • Star 24 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save cmod/2806e61b6fef9fa95266 to your computer and use it in GitHub Desktop.
# =======================================
# OS X — ONE CLICK — EJECT ALL DISKS
# =======================================
# Open Script Editor on OS X
# Copy and paste this file in
# Pre-High Sierra: Save As > Application
# High Sierra: Export > File Format > Application
# Name it "Eject All Disks"
# Drag created application to Dock
# Now you can eject all external disks with one click from Dock
# ???
# $$$ & faster get-out-of-house-with-laptop
# ========================================
# OLD Version, stopped working in El Capitan:
# tell application "Finder" to eject (every disk whose ejectable is true and local volume is true and free space is not equal to 0)
# This works with El Cap, Sierra, High Sierra, etc:
tell application "Finder" to eject (every disk whose ejectable is true and local volume is true)
@olivierlacan
Copy link

This is great. Thank you.

@kevinSuttle
Copy link

Any ideas?
Finder got an error: Can’t make 1 into type type class. (-1700)

@chrismoffett
Copy link

I get the same error. Thoughts?

Finder got an error: Can’t make 1 into type type class. (-1700)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment