Stop Mac from mounting volumes with -1

From your noodle to other noodles. Talk about ways to get the most from Hazel. Even exchange recipes for the cool rules you've thought up. DO NOT POST YOUR QUESTIONS HERE.

Moderators: Mr_Noodle, Moderators

Stop Mac from mounting volumes with -1 Wed Mar 27, 2013 10:01 am • by tscibilia
Problem
I have a synology NAS that hosts and streams all my Media and most of my documents. I've been recently been having problems with iTunes, Hazel (viewtopic.php?f=4&t=2020), and other applications due to the Volumes folder on my mac having many mounted volumes of the same name ... or so I thought. in actuality most of the Volumes were actually Media-1, Media-2, etc.

Solution:
I set up a Hazel script to monitor and delete these bogus Volumes as follows
/Volumes
Unmount Drives with "-#"
• If <all> conditions met for <the file or folder being matched>
<Name> <Contains> - (i used the hypen symbol since all volumes have a -1 appending the volume name and none of my volumes have a hypen in its name)
• Do the following
<Run AppleScript>
Code: Select all
tell application "Finder"
   eject disk theFile
end tell


Log Result:
2013-03-27 09:49:27.857 hazelworker[62364] home-1: Rule Unmount Drives with "-#" matched.
2013-03-27 09:49:29.260 hazelworker[62364] home-2: Rule Unmount Drives with "-#" matched.
2013-03-27 09:49:31.105 hazelworker[62364] home-3: Rule Unmount Drives with "-#" matched.
2013-03-27 09:49:35.017 hazelworker[62364] home-4: Rule Unmount Drives with "-#" matched.
tscibilia
 
Posts: 11
Joined: Fri Dec 21, 2012 12:55 am

Return to Tips & Tricks - DO NOT POST QUESTIONS