XP batch file question

  • Thread starter Thread starter Mary
  • Start date Start date
M

Mary

I want to write a batch file to run on startup to clear out the local
settings/temp folder of all files except those with today's date.

So far I have compiled:

cd\
cd C:\Documents and Settings\name\local settings\temp
del /Q *.*
echo Deleting Files
echo File Deleted
pause
exit

How can I instruct it to not include files with today's date?
Does the rest look OK?

Thanks
 
Mary said:
I want to write a batch file to run on startup to clear out the local
settings/temp folder of all files except those with today's date.

That's not a good idea since this may disturb an installation process.
Instead, you may want to install a script, running at Windows startup.
http://www.helmrohr.de/ftproot/Deltemp.zip

That script checks if there is a "pending file rename operation" and if
this is the case, temporary files and subfolders will not be deleted.
 
Back
Top