Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Automatically clean up Finder's Recent Folders menu Desktop
Some of you might be using the hidden setting to control the number of entries in the Recent Items menus (as in this hint or via TinkerTool) to disable the menus entirely, for example on shared computers or other situations.

Unfortunately, the Finder has a menu of recently-accessed folders in the Go menu that nobody has yet found a way to disable. In case you really need to get rid of this feature, here is a crontab line that will clear the menu every minute:
* * * * * osascript -e 'tell application "System Events" to click menu item "Clear Menu" of menu of menu item "Recent Folders" of menu of menu bar item "Go" of menu bar of process "Finder"' >&/dev/null
It works by clicking on Finder's Recent Folders » Clear Menu menu item every minute. The nice thing is that it does so in an invisible manner, without bringing Finder to the front or otherwise disrupting your workflow, and it wastes only a few milliseconds of processor time every minute. This is a generic technique that may be applied to all sorts of needs: just look at the string of menu labels, and adapt to your needs.

You will need to enable access for assistive devices in the Universal Access System Preferences panel for this to work.

[robg adds: If you need help with crontab, this older hint provides a decent starting point.]
    •    
  • Currently 2.20 / 5
  You rated: 4 / 5 (10 votes cast)
 
[17,515 views]  

Automatically clean up Finder's Recent Folders menu | 7 comments | Create New Account
Click here to return to the 'Automatically clean up Finder's Recent Folders menu' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Automatically clean up Finder's Recent Folders menu
Authored by: rexroof on Feb 24, '09 12:06:47PM

it is a really bad idea to run any cron job every minute. Even the most paranoid person should change that first * to */5 or */10 to run the job every 5 or 10 minutes, respectively.



[ Reply to This | # ]
Automatically clean up Finder's Recent Folders menu
Authored by: jungle_jim on Feb 25, '09 08:34:54AM

hi,

why is this? is it something to do with potentially overloading the system or something else?

thanks



[ Reply to This | # ]
Automatically clean up Finder's Recent Folders menu
Authored by: rexroof on Feb 25, '09 10:07:28AM

Yes. What if, for some reason, this applescript doesn't finish in a minute? Then you have a second copy running. If that causes further slowdowns, then you could end up with a quickly escalating system problem.
This constantly forking process that is calling applescript could cause lots of unexpected results in your battery life, or your interface response time. Your system being distracted by running this process under the Finder could have lots of unexpected results.

I actually think posting this as a hint on the site is sort of irresponsible.



[ Reply to This | # ]
Automatically clean up Finder's Recent Folders menu
Authored by: e_whizz on Feb 25, '09 05:29:16AM

The finder writes this info back to the com.apple.finder.plist on logout only. Perhaps a cron job to clean this up on logout might be better (you don't need to hide your recent activity from yourself do you?)




[ Reply to This | # ]
Automatically clean up Finder's Recent Folders menu
Authored by: asmeurer on Feb 26, '09 12:22:46PM

This would also avoid using AppleScript, which can be slow. Running an AppleScript every minute would probably significantly slow down a system.



[ Reply to This | # ]
Automatically clean up Finder's Recent Folders menu
Authored by: etatoby on Dec 08, '12 06:16:42PM

"Would probably significantly slow down"? I call BS.

The time command tells me this script takes 65ms of CPU time to execute. Considering my CPU has 2 cores, by running this cron every minute I'm slowing down my system by about 0.05%.

I think most people would qualify that as negligible.



[ Reply to This | # ]
Automatically clean up Finder's Recent Folders menu
Authored by: ruggix on Feb 05, '10 01:13:33AM

I don't know whether it could be helpful but I found another solution. If it is enough for you to have the list deleted at shutdown, you can apply my hint:
http://www.macosxhints.com/article.php?story=2010020209234887



[ Reply to This | # ]