Wednesday, 4 March 2009

Windows Cleanup Batch Script

OK, I'm getting tired of people recommending Windows clean up software to each other. Clean up software is often bloated & won't clean everything. So I have made this tutorial to show you how to make a file you click & it does it all for you. No software needed. Here we go....

Create a new file using Notepad & call it "cleanup.bat"

Now it's created, right click it & press "edit".

Now copy this into it -


@echo off
DEL /S /Q /F "%systemroot%\temp\*.*"
DEL /S /Q /F "%systemroot%\prefech\*.*"
DEL /S /Q /F "%username%\cookies\*.*"
DEL /S /Q /F "%username%\local settings\temp\*.*"
DEL /S /Q /F "%username%\temporary internet files\*.*"
DEL /S /Q /F "%username%\recent\*.*"
DEL /S /Q /F "%systemdrive%\documents and settings\localservice\cookies\*.*"
DEL /S /Q /F "%systemdrive%\documents and settings\localservice\local settings\temp\*.*"
DEL /S /Q /F "%systemdrive%\documents and settings\localservice\local settings\temporary internet files\*.*"
DEL /S /Q /F "%systemdrive%\documents and settings\networkservice\cookies\*.*"
DEL /S /Q /F "%systemdrive%\documents and settings\networkservice\local settings\temp\*.*"
DEL /S /Q /F "%systemdrive%\documents and settings\networkservice\local settings\temporary internet files\*.*"
CLS
echo System Cleanup Complete =)
pause


This will only clean up Windows directories. You will need to add your own directories for third party programs like Firefox, to get it to clean them.

Now save it. Whenever you want to clean your PC, just double click it & watch it do it's magic....

0 comments:

Post a Comment