Recent files folder

  • Thread starter Thread starter Paul Gulliver
  • Start date Start date
P

Paul Gulliver

Is it possible to select which type of files that are kept in the recent
files folder, I would prefer just to keep references relating to Office
documents instead of all the other rubbish I look at during the course of a
day.

Paul
 
Is it possible to select which type of files that are kept in the recent
files folder, I would prefer just to keep references relating to Office
documents instead of all the other rubbish I look at during the course of a
day.

Paul
Schedule CleanRecent "c:\Documents and Settings\YourUserName"
to start when you log on but schedule it using the local Administrator account,
so it runs in the background (because you are logged on as Paul.
Add any other extensions to the "DOC MDB PPT XLS" string that you want to
preserve.

@echo off
if {%1}=={} @echo Syntax: CleanRecent UserProfilePath&exit /b 1
setlocal
set userp=%1
set userp="%userp:"=%\Recent"
:loop
ping -n 61 127.0.0.1>nul
for /R %userp% %%a in (*.*) do set file=%%a&call :test1
goto loop
:test1
for /f "Tokens=2,3 Delims=." %%f in ('@echo %file%') do set p2=%%f&set p3=%%g
if /i "%p3%" NEQ "lnk" del /q "%file%"&goto :EOF
set OK=
for /f "Tokens=*" %%f in ('@echo %p2% ^|findstr /i /l "DOC MDB PPT XLS"') do (
set OK=%%f
)
if not defined OK del /q "%file%"

Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
Not to clear on this, I asume I create a batch file CleanRecent.bat with the
programme in it, and schedule the batch file to run on startup. I've tried
this (to run at a given time rather than startup) but although it runs it
doesn't delete anything.



Paul





 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top