Jump to content
lazermoose

[SOLVED] Workflow for ejecting external drive

Recommended Posts

I have an external drive that I only use for an app-specific task (recording audio).

The drive is located in a semi-incovenient place so I sometimes forget to unplug it when I'm done.

Is there a workflow I can create to eject the external disc when I close the app?

Thanks!

Share this post


Link to post

Connect a Keyword (or whatever trigger you prefer) to a Run Script Action with Language set to /bin/bash. Set the code to:

open --wait-apps -a 'APP'
diskutil eject '/Volumes/DISK'


Replace APP with your app’s name (e.g. Safari) and DISK with your drive’s name. If you don’t know the drive’s name, open a terminal and run ls /Volumes with it connected.


You still need to run the Workflow for it to eject the drive after the app closes, but it doesn’t matter if the app was open at the time or not.


On a tangential note, when asking for help, it helps us help you if you’re as specific as possible. For example, instead of saying “I have an app”, tell us what the app is. More often than not, those details matter.

Share this post


Link to post
1 minute ago, vitor said:

 


On a tangential note, when asking for help, it helps us help you if you’re as specific as possible. For example, instead of saying “I have an app”, tell us what the app is. More often than not, those details matter.

Thank you Vitor.  Apologies for not being specific.  Don't know if it matters at this point but the app is Reaper (Cockos).  It's a DAW for music and audio.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...