Forums
IT Daily Life :: Forums :: IT Daily Life :: I.T. Discussion
 
<< Previous thread | Next thread >>
Batch file to clean up your computer
Moderators: Administrator, Nucleus
Author Post
Nucleus
Fri May 28 2010, 03:01AM

Registered Member #2
Joined: Fri May 28 2010, 02:27AM

Posts: 5
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
Back to top
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System