HELP - a lot of past (sess_*) files in my c:\windows\temp

I’m running a PHP web application. But there are a lot of past (sess_*) files left in my c:windowstemp folder. Many of them were created months ago. Their number grows fast (over 50,000 already)!

Is it a wrong configuration will cause this?
Is there anyway I can remove the past (sess_*) files automatically?

In a perfect world Windows would clean this up normally on a reboot (or at regular intervals) But alas… it is WinDOZE ritght?

I would just write a simple “Batch” File that deletes all the files in the temp folder and schedule it to run at a particular interval using the Windows Scheduler.

REM Below will DELETE all files (and in sub-dirs) without prompting
REM "Adjust" the path if it's a different location
REM such as "c:Documents and SettingsuserLocal SettingsTemp"
del  "c:Temp*.*" /f /s /q 

REM Pause will cause the Batch to stop "Pause" so that any error
REM Messages can be seen.
REM Once running fine, you can "REM" it out.
Sponsor our Newsletter | Privacy Policy | Terms of Service