Subscribe to How-To Geek

Recommended: Click Here to Run a Free Scan for Common PC Errors   [Sponsored Link]

Create a Shortcut to Delete Recent Items in Windows Vista (or XP's) Start Menu

Have you ever tried going through all of the menus required to delete the Recent Items in the XP Start Menu? It takes forever, especially when you want to hide whatever you shouldn't have been doing. As usual, there's a simpler way to do it.

[Update] A number of readers have pointed out that in Vista you can just right-click the recent items and choose "Clear Recent Items List". XP is the only one with a bunch of menus to go through. Either way this should work the same across both versions.

You can either manually open the shell folder and clear out the items, or you can use the script I've provided which will actually give you a shortcut that deletes the recent items with nothing more than a double-click.

Just to be very clear, this is the list of items that we'll be clearing out:

image 

Note: This will not actually delete those files, it will just delete the shortcuts to the files that are stored in the recent folder.

Where Is the Recent Folder so I Can Delete Them Manually?

Like many folders in Windows, this one is hidden away underneath your profile folder. The full path on Windows Vista would be this, substituting your username into the path:

C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Recent\

If you are using the command line, you can use the %APPDATA% environment variable to figure out the path without needing to know the username (This also works in Explorer as well)

%APPDATA%\Microsoft\Windows\Recent\

Or the easiest possible way is to just type in this shell shortcut into the address bar or start menu search box:

shell:recent

image

You can remove any items from this folder, or even delete all the items. You'll see them disappear from the Recent menu immediately. Again, these are just shortcuts to the actual file, as you can see with the Type column above.

Clear Out the Recent Items With a Shortcut

With a little bit of Windows Script Host magic, we can make a script that deletes the items in the recent folder… it only takes 4 lines of code!

Create a new file named DeleteRecentItems.js with Notepad, and then paste in the following lines (Or just download the zipped file linked below)

var fso = WScript.CreateObject("Scripting.FileSystemObject");
var WSH = new ActiveXObject("WScript.Shell");
var folder = WSH.SpecialFolders("Recent");
fso.DeleteFile(folder + "\\*.*");

Once you save the file, you should now have a new icon that can be double-clicked to clear the recent items.

image

If you want to assign a new icon or add a shortcut key, you'll need to create a shortcut to the file. I'd recommend putting the script file into a folder somewhere, and then creating a shortcut to it in your Quick Launch or Desktop folder.

Once you have the shortcut created, you can right-click on it and choose Properties, and then click on Change Icon or add in a Shortcut key if you would like.

image

Disclaimer: I tested this out on Windows Vista, but since this deletes files… use at your own risk and I'm not responsible, etc =)

Download DeleteRecentItems Script (Zipped)

The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 04/2/08 and tagged with: Windows Vista, Managing Files and Folders

Comments (14)

  1. jdw242b

    just like other things of this nature, it will not protect you from people actively seeking what you've done recently. There are still traces:

    http://www.nirsoft.net/utils/iehv.html

    You can still see where someone has been, what files they opened, and other things.
    (where they've been supposed they are using IE)

  2. Harry Bedfor

    Yo dude! Just right click on the recent items link on your Start menu, then choose "Clear Recent Items List".

    Not hard at all

  3. Harry Bedford

    Dude! Re clearing the recent items folder, just right click on the Recent Items link in your Start menu, then choose "Clear Recent Items List".

    Not hard at all.

  4. The Geek

    @Harry

    You are correct, I think perhaps I sold the idea the wrong way =)

    This is a very common request that I get though, so I figured it might help somebody.

  5. Carl@Brightrev

    Too bad - all that work on creating slick solution with a script and everything, and the right-click menu was right there all along. It's nice to know that even experienced Geeks miss one every now and again.

  6. The Geek

    @Carl

    Yeah, I definitely put the wrong spin on the article. Had I been paying more attention I would have written it for XP instead of putting vista into the title. It's actually useful for XP… not so much for Vista.

    I need more sleep. =)

  7. timothy

    This could be useful for my XP machine, thanks!

    Oh, and get some rest, so you can get back to writing great tweaks for us lesser geeks. :-)

  8. HASH

    Geek, you have pointed out the principles, but i have automaticcally assigned CCleaner to delete everything in the Recent Folder. All i have to do is Right-click run it from the traybar, and 0.5 seconds, voila its deleted. :)

  9. Maher

    @ Hash
    Beware of CCleaner it delete your Systeme Restore Points

  10. MLL

    @Maher -
    NAH…People don't need system restore points, those just take up needed hard drive space. Just make a complete image of your hard drive every once in a while and be done with it. [halfway joking]

  11. Brog

    Why not just make a super-simple batch file to do it in one line?

    DEL /Q C:\Docume~1\%UserName%\Recent\*

    Works for me..

  12. n00b

    It has been useful for me!

    With Vista you have the choice of the Vista start menu or the Win95 start menu (try it). :(

    IT IS NOT THE WINXP START MENU!!!!!!!!!!

    So if you want a recent documents shortcut you have to make it yourself, which means there is no rightclick and clear documents.

    Thanks for this! - Need a way of listing recently used programs… where are they held?

  13. Vista user is confused

    I'm using Vista Home Premium, and I see no "clear recent items" option. I've tried right-clicking on the actual Recent Items button, and on items in the list itself. The option is not there. I did a search for "clear recent items list" in Help & Support and found nothing.

  14. haha :P i did it myself, without downloading the .zip, and it works out just fine.. thx geek :P


Leave a Comment




Leave your friendly comment here. If you have a computer help question, leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.