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.]