• ARTICLES
SEARCH

How-To Geek

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)

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 04/2/08

Comments (22)

  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

  15. Bob

    Worked great – now how about adding Clear Temp files, Cookies, Temp Internet Files etc – There are plenty of programs out there that do these tasks but all of them do everything and give no choice of what the user wants to do. I tried to modify the script for The recent Folder to delete cookies but all I got was Access denied

  16. Bo-Gran Hammargren

    I have been working with this problem for an endless time.
    Thanks for the tip – it made my day.
    I also noticed on my PC that the number of Maxdocument is much less than I defined
    becuese it counts the folders as well as the files.
    Your proram was of much help because the “ClearRecent DocsOnExit”
    doesn’t do what it is supposed to do. Thanks again

  17. Alex

    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.

    It used to be there, but after some update it went away. You’re not crazy, mine is missing too.

    It is also pretty useless, as it keeps such a long list, but displays them alphabetically. This means that files that start with numbers are the only ones on the list unless I have cleared it recently. Does anyone know how to change the number of things smaller, and also bring back the clear list function?

  18. RJFPC

    Works good for me on WinXP…

    I simply created a .txt file, then opened it, then pasted the script, then saved it, then renamed it to cleardocs.js.

    Then just double click it or it’s shortcut and whalla!
    Clears the recent documents!
    woot!

    Thanks Geek!

  19. Valerie

    I’m having the same problem as Alex two posts above me. Sometime in the last month, my recent items folder has stopped working properly. It does exactly what Alex says, and therefore provides very little useful information. It keeps files in Recent Items actual folder a really long time, thus making the alphabetical list on the Start menu really obsolete. No matter how old, it lists files starting with numbers, so an alphanumeric list as opposed to a true reverse chronology.

    Also, at the same time my index function no longer searches for WordPerfect documents, just, all of sudden for no apparent recent. I too am wondering whether this is a Windows Vista Update gone awry.

  20. Tony

    Alex and Valerie:

    The reason you do not see ‘Clear Recent Items List’ is probably that you used the geek’s script or some third party tool to delete everything from the Recent folder on your Vista machine.

    Geek: your script is dangerous to run on Vista – it deletes the default desktop.ini file also. You may not notice the effects immediately – but the next time you restart your computer, you’ll find that Recent Items folder has lost it’s special properties including the ‘Clear Recent Items List’ option.

    To fix the missing ‘Clear Recent Items’ option on Vista:

    a) Delete the whole Recent Items folder. (If you cannot delete the Recent Items folder, use the geek’s script to delete the desktop.ini in there; restart your computer; and then try again.)

    b) Type ‘shell:Recent’ at the start menu search box. This will recreate the Recent Items folder with the default desktop.ini file.

    c) Restart your computer.

    thanks.

  21. wiserjoe

    works if u are on a school computer and want to delte your recently saved documents

  22. rj manalo

    pwed,, magtanong paano po ung delete connect mo sa vb06 ung mismong delete ng keybord….

Enter Your Email Here to Get Access for Free:

Go check your email!