PDA

View Full Version : How to clear "Recent Places"?


Handycam
07-10-2005, 04:44 PM
where is the info for the "recent places" menu in open/save dialogs kept? From time to time, I'd like to clear/reset this menu. If I need to share my mac I may not want other users to so easily see which folders I've been using.

I know how to reset the Finder's "recent" menus, but there's no obvious way to clear the open/save one.

thanks

biovizier
07-10-2005, 10:18 PM
The entries for "Recent Places" available from the pull-down menu in "Save" dialogues are stored in the invisible "~/Library/Preferences/.GlobalPreferences.plist" file in the user's "Home" directory. To delete them, try launching "/Applications" > "Utilities" > "Terminal.app" and entering this command:defaults delete -g NSNavRecentPlaces

Handycam
07-12-2005, 09:34 AM
The entries for "Recent Places" available from the pull-down menu in "Save" dialogues are stored in the invisible "~/Library/Preferences/.GlobalPreferences.plist" file in the user's "Home" directory. To delete them, try launching "/Applications" > "Utilities" > "Terminal.app" and entering this command:defaults delete -g NSNavRecentPlaces


thanks, but this doesn't seem to have any effect. All the recent places are still there...

biovizier
07-12-2005, 01:02 PM
That's odd - it works on my system (10.3.9) and it isn't even necessary to quit an open app for the change to take effect. After poking around a bit more, it appears that the key also functions when it is in the "GlobalPreferences" .plist file in the "ByHost" folder (though my system did not have an entry there) so you could try this command:defaults -currentHost delete -g NSNavRecentPlacesIn case either of those files is corrupt, try temporarily moving them out of the "Preferences" folder.

To explore the possibility that the setting is in some other file, you could search for one of your "recent places" using this command:defaults find "foldername"Otherwise, with the 'defaults delete' command, were the files altered at least? Perhaps you could try checking / editing the file manually. eg:open -e ~/Library/Preferences/.GlobalPreferences.plist
Note that the above comments refer specifically to the items under the "Recent Places" portion of the popup menu, and will not alter the appearance of the "current" directory and path for each programme's dialogue boxes. To reset those, you would have to delete the 'NSNavLastRootDirectory' property from each application's .plist file individually.

Raven
07-12-2005, 01:17 PM
Well I know that Recent servers is a folde rin your ~/Library folder if thats what your looking for...

Handycam
07-12-2005, 03:23 PM
Further investigation shows that your hint does indeed work for COCOA apps. It does nothing for CARBON apps, such as Entourage or Thoth. Any idea where Carbon apps are getting their "recent places" from?

Raven
07-12-2005, 03:48 PM
I checked for Entourage, and it seems that when you visit a place (recent folders in Entourage's case) it gets added to the com.microsoft.entourage.plist file located in your ~/Library/Preferences folder...

biovizier
07-12-2005, 03:54 PM
Hmm, I see - it didn't occur to me to check any "Carbon" apps. Another possibility - try:defaults delete -g AppleRecentFolders

Handycam
07-12-2005, 05:52 PM
Another possibility - try:defaults delete -g AppleRecentFolders

That did it! Thanks!!

Now all I need to do is figure out how to add it to a cron job... I added it to my script menu for now.

wiidman
11-29-2007, 05:00 PM
Very interesting thread!

Some more things to clear out for Tiger doing the find and delete: RecentPlaces, LastRoot, RecentFolder, LastCurrent, LastURL, LastAttach.

obewong
03-16-2008, 08:50 PM
Even after I've done all these terminal commands, renamed the folder, copied the folder and deleted the original.... it still wanted to 'Save-as' in a folder I had once used 3 months ago, in a path that physically did not exist anymore.

Something like this should never happen in a production release of an operating system. The finder is a very buggy piece of software and should be renamed the Loser !

Hal Itosis
03-16-2008, 10:24 PM
Even after I've done all these terminal commands, renamed the folder, copied the folder and deleted the original.... it still wanted to 'Save-as' in a folder I had once used 3 months ago, in a path that physically did not exist anymore. Something like this should never happen in a production release of an operating system. The finder is a very buggy piece of software and should be renamed the Loser!

Oh boo hoo.

It was probably the application which chose the old folder.
Which program? Which version? Did you delete *its* plist?

-HI-

obewong
03-17-2008, 03:39 AM
boo hoo? No need for your sarcasm.

To answer your question - yes... as i said i did all that as specified in this thread! I know many other people who get the same problem regularly so there is definitely a problem with the finder OK dude!

pendragon
03-17-2008, 04:26 AM
FWIW: Amongst its many other functions, TinkerTool System allows one to easily and selectively remove/clear recent documents, applications, and servers.

How well this TTS action can be added to a cron, well, others know better.

hayne
03-17-2008, 11:33 AM
To answer your question - yes... as i said i did all that as specified in this thread!
You don't seem to have answered the question about which application it was whose Save dialog referred to an old path.

benwiggy
03-17-2008, 12:28 PM
Have you considered the drop down menu in System Preferences > Appearance?
You can set the number of Recent Items to None. It may even be possible to set this using AppleScript or a defaults write command.

decavolt
07-22-2008, 03:09 PM
Or you can try this:
OSX: one-click to wipe Finder, Firefox, Safari and Trash (http://www.decavolt.com/2008/07/osx-one-click-to-wipe-finder-firefox-safari-and-trash/)

I wrote a small app that wipes entries in the Recent Places and Recent Folders menus in Finder. It works on Tiger and Leopard (haven't tested Panther), and it's free.

anika123
01-08-2010, 10:06 AM
Alright I am bumping this old thread up after seeing the hint today which is actually the same as benwiggy above. http://www.macosxhints.com/article.php?story=20100106164032362

My interest is in launching an apple script that does this. Is this possible? It would be nice if I could set up a couple different scripts to wipe documents or servers and then launch them from Spark.

Anyone have any pointers?

NaOH
01-08-2010, 05:16 PM
This script should do the trick, anika123. Change the Recent Documents value as desired. For a version of this to handle recent servers, simply replace all instances of "documents" with "servers."


tell application "System Events"
tell appearance preferences
if recent documents limit is greater than 0 then
set properties to {recent documents limit:0}
else
set properties to {recent documents limit:15}
end if
end tell
end tell


You'll want to run the script twice: once to set the value to zero, and once to return it to the setting you want (e.g., 15 documents). The script works instantaneously, so you could rapidly invoke your shortcut twice to clear the items and reset the setting to your desired value.

anika123
01-08-2010, 05:50 PM
Thanks, looks like it should suit my needs.