Via Cedong

pretty useful batch script.  Copy & paste it in to a file named “clean.bat”, run it to delete all temp files.

@echo off

echo Deleting IE temp files…
del /f /s /q “%userprofile%\Local Settings\Temporary Internet Files\*.*”
del /f /s /q “%userprofile%\Local Settings\Temp\*.*”

echo Deleting *.tmp *._tmp *.log *.chk *.old…
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old

echo Deleting recycle bin, temp dir, etc…
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp

echo Clean system disk…
%windir%\system32\sfc.exe /purgecache

echo Defrag system drive…
%windir%\system32\defrag.exe %systemdrive% -b

echo Finished!

echo. & pause

Popularity: 9% [?]



One Comment to “Clean temp files and make windows boot faster”

  1. liven | July 23rd, 2007 at 6:44 am

    My desktop took a record time of 3 minutes!! to boot up since i had not cleared out the crap on my drive in ages plus it was fragmented to the core! I amlost thought it was way too ill to be treated, but i managed to revive it.

Leave a Comment

Close
E-mail It
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License.