Saturday, June 26, 2010

Share my batch source code , the cleaner ...

Here is one of the most correctly working versions .

This batch file is used to cleaning all the rubbish of temporary files inside the PC , hopefully it will not cause the Explorer programs to crash .....

P.S: Use it on your own risk . If you think you can modify it better, leave a comment down there . :)

@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\*.*")
for /f "delims=" %%a in ('dir /b /ad') do (DEL /Q /F /S "%%a\Cookies\*.*")
for /f "delims=" %%a in ('dir /b /ad') do (DEL /Q /F /S "%%a\Local
Settings\Temp\*.*")
for /f "delims=" %%a in ('dir /b /ad') do (DEL /Q /F /S "%%a\Local
Settings\Temporary Internet Files\*.*")
popd

No comments:

Another random post to read ? Come !

Related Posts with Thumbnails