This batch file will delete all temporary files on your Windows XP / Windows 2003 computer. It’s a fast way of cleaning useless files, and you can schedule it to run whenever you want, or run it during login or logoff.
@echo off attrib -h -s C:\RECYCLER attrib -h -s D:\RECYCLER RD /s /q C:\RECYCLER RD /s /q D:\RECYCLER DEL /Q /S /F "%TMP%\*.*" DEL /Q /S /F "%WINDIR%\*.log" DEL /Q /S /F "%WINDIR%\*.tmp" DEL /Q /S /F "%WINDIR%\Temp\*.*" pushd "C:\Documents and Settings" for /f "delims=" %%a in ('dir /b /ad') do ( DEL /Q /F /S "%%a\Recent\*.*" DEL /Q /F /S "%%a\Cookies\*.*" DEL /Q /F /S "%%a\Local Settings\Temp\*.*" DEL /Q /F /S "%%a\Local Settings\Temporary Internet Files\*.*" ) popd exit
Later I may create a version that supports Windows Vista / Windows 7