Clear Recent Documents history in a single click in Windows XP and Vista
One of our readers asks "I need a batch file or script to clear the recent documents list from the Windows XP Start Menu".
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:

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 the 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, say clearrecent.vbs. You can then move this script to your Quick Launch folder for easy accessibility. 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 VBScript icon that Windows assigns.
RELATED POSTS
- Shell: commands to access the special folders
- How to Print the Windows Update history in Vista
- How to disable Windows Parental Controls reminder
- Where is the “Up” button in Windows Vista?
- Thumbnail Preview not shown for pictures in Vista?
Bookmark this Page!BlinkList | del.icio.us | Digg it | Furl | reddit | Spurl | StumbleUpon | Wink |


If you enjoyed this post, make sure you
Prefer an E-mail subscription?