Did you notice that in Windows XP it takes exactly half a dozen mouse clicks to clear the Recent Documents history in the new Start menu. This is the option that I’m talking about:

One of our readers asks "I need a batch file or script to clear the recent documents list from the Windows XP Start Menu".

This is a legitimate request. So, here is a VBScript that’ll automate the work for you. It works in Windows XP as well as in Windows Vista. Note that if you’re using Windows Vista, there is no real need for such a script, because you can do it directly from the Start menu. (Click Start, right-click Recent Items, and then click Clear Recent Items List)

Script to Clear Recent Documents History (Windows XP/Vista)

Set WshShell = WScript.CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
sRD = WshShell.SpecialFolders("Recent")
if sRD <> "" then objFSO.DeleteFile(sRD & "\*.lnk")

Instructions

Copy the above code to Notepad, and save the file with .vbs extension. (e.g. clearrecent.vbs) You can then move this script to your Quick Launch folder for easy access. Note that if you create a shortcut of the script in the Quick Launch folder, you can even customize the icon if you’re bored of seeing the default Windows Script icon.

Bookmark this Page!

BlinkList | del.icio.us | Digg it | Furl | reddit | Spurl | StumbleUpon |

Related Posts


Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

2 Responses to “Clear Recent Documents History in a Single Click in Windows XP and Vista” Subscribe to comments!

  1. Sir
    said this on Monday, November 9th 2009 6:22 am

    This Works!

  2. Emarell
    said this on Saturday, April 11th 2009 7:43 pm

    Another masterful article by Ramesh Srinivasan – thank you again. The method I found here months ago (here- http://www.winhelponline.com/blog/clear-recent-items-list-missing-right-click-recent-folder/) has turned out to work only until the next reboot. Vista manages to shred it up over and over – so annoying.

    The whole Recent Items function is buggy in Vista; some documents do not get listed after they are opened, some do. I have yet to discern a pattern.

    However, at least for clearing the list, the script offered on this page will work. It stays put too. Really. No kidding.

Leave a Reply