zamboknee Posted June 11, 2019 Share Posted June 11, 2019 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! Link to comment
vitor Posted June 11, 2019 Share Posted June 11, 2019 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. Link to comment
zamboknee Posted June 11, 2019 Author Share Posted June 11, 2019 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. Link to comment
zamboknee Posted June 16, 2019 Author Share Posted June 16, 2019 Got it to work for 'eject.' is there a reverse method to 'mount' the drive? Link to comment
zamboknee Posted October 17, 2019 Author Share Posted October 17, 2019 Been using this workflow since @vitor provided it but now it's launching the app a SECOND time when I use this workflow. For instance, I'll already have a workflow that I use to open some sites and apps which include Reaper (DAW). Here: That workflow will launch everything just fine. I'll do my work and midway through I will do the 'Eject Disk' Workflow, seen here: But when I do the 'Eject' workflow it will launch 'Reaper' again and I'll have 2 windows for Reaper open. Any idea what went wrong here? Thanks Link to comment
vitor Posted October 17, 2019 Share Posted October 17, 2019 Have you updated to Catalina? Maybe open’s behaviour has changed there. Link to comment
zamboknee Posted October 18, 2019 Author Share Posted October 18, 2019 No, I haven't updated to Catalina. Waiting on more of my apps to update to 64bit. Link to comment
zamboknee Posted September 4, 2020 Author Share Posted September 4, 2020 On 6/11/2019 at 9:01 AM, vitor said: 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. So I need to close 2 external hard drives with this. Can I just add "eject 'Volumes/DISK2?" Link to comment
zamboknee Posted September 4, 2020 Author Share Posted September 4, 2020 I posted about needing to eject an external hard drive here but it has been marked 'solved' but I need to eject MORE THAN 1 external drive now. Do I modify that was posted in my original post? How do I do this? Thanks Link to comment
deanishe Posted September 4, 2020 Share Posted September 4, 2020 1 hour ago, lazermoose said: I posted about needing to eject an external hard drive here but it has been marked 'solved' but I need to eject MORE THAN 1 external drive now Then unmark it solved? At any rate, please don't create another thread. That one isn't locked. I'm merging this thread with that one. Link to comment
deanishe Posted September 4, 2020 Share Posted September 4, 2020 15 hours ago, lazermoose said: Can I just add "eject 'Volumes/DISK2?" Yes. It would have been a lot quicker to try it instead of asking first… Link to comment
zamboknee Posted September 8, 2020 Author Share Posted September 8, 2020 Thanks. Quote a lot quicker to try.... I'm hesitant to try anything that involves code unless I KNOW it's safe. That's why I ask here. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now