peter1234 Posted November 24, 2005 Share Posted November 24, 2005 (edited) I would like to write a script that I can put in startup folder that will erase the recent documents folder each time Windows starts. But, I can not find out where the folder with the recent documents list is. Does anyone know where it is?EDIT: I found the following batch file on the web at http://jeffwalso.tripod.com/batch.htmcd ..cd recentecho y| del *.* This seems to work as a batch file. I will try to use it in startup folder, but first I have to re-install my system. I tried a shareware program that is messing things up and does not want to un-install.EDIT2: Made shortcut to batch file and added to startup folder. This runs at startup but does not clear file. Apparently the batch file must be run after Windows starts. Edited November 24, 2005 by peter1234 Link to comment Share on other sites More sharing options...
SpookMeister Posted November 24, 2005 Share Posted November 24, 2005 You can access the path to your recent docs as: $var = @UserProfileDir & "\Recent" Look at the following in the help file to make a script for doing what you want: FileFindNextFile FileDelete [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Valuater Posted November 24, 2005 Share Posted November 24, 2005 you should try my *XPClean Menu* click the link below... its awesome (and free ) 8) Link to comment Share on other sites More sharing options...
peter1234 Posted November 25, 2005 Author Share Posted November 25, 2005 SpookMeister: Thanks. This works:;deletes files in the Windows Recent Documents folder #include <GUIConstants.au3> $var = @UserProfileDir & "\Recent" FileChangeDir($var) $search = FileFindFirstFile("*.*") If $search = -1 Then Exit While 1 $file = FileFindNextFile($search) If @error Then ExitLoop FileDelete($file) WEnd FileClose($search) Exit I added compiled version to program files folder and put a shortcut in the startup folder. Link to comment Share on other sites More sharing options...
nobby Posted November 25, 2005 Share Posted November 25, 2005 And if you also want to cleanup the recent Microsoft Office stuff @UserProfileDir\Application Data\Microsoft\Office\Recent Office keeps an incredible number of files in there. Very annoying, especially in roaming profiles. You also probably find that cleaning recent at logoff or shutdown is more effective. Use the group policy to set this CheersNobby Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now