Jump to content

Clear recent documents/programs


BoardBabe

Recommended Posts


Here is a vbs script that will clear out the My Recent Documents

Save as ClearRecent.vbs

Dim Act	: Set Act = CreateObject("Wscript.shell")
Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")
Dim User : User = Act.ExpandEnvironmentStrings("%userProfile%\recent\")
Dim Folder : Set Folder = Fso.GetFolder(User)
Dim Files : Set Files = Folder.Files
Dim objFile
For Each objFile in Files
Fso.DeleteFile(objFile.Path), True
Next
Act.Popup "Completed Script",5,"Finished",4128
'-> Deletes The File If Used from A SFX Uncomment To Make Active
' If Fso.FileExists(WScript.ScriptFullName) Then
' Fso.DeleteFile(WScript.ScriptFullName)
' End If

Edited by gunsmokingman
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...