Wednesday, December 24, 2008

Useful .bat files

If in case you do not know what a .bat file is, I suggest you to read Batch Files before proceeding any further.

Are you back? Okay, that was real quick :)

I am not going to take any effort in explaining in any of the below batch files. Why don't you just Google it and learn, if you are that eager? Lol Not that I am too lazy to explain you but I really want you to get to know them all by yourself for you might even end up writing your own batch file then. Fair enough?

Alright! With no further lecture, here I present you the batch files:

How to use:

  1. Copy and paste the codes in an empty notepad. Give them any name you want to but save them with .bat extension for them to become a batch file.
  2. Double on the .bat file to execute it.

Quick Clean:

@echo off
echo starting ......
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
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
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\local settings\temporary internet files\*.*"
del /f /s /q "%userprofile%\local settings\temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
echo ok!
echo. & pause

Cookies Cleaner:

cd %userprofile%
del cookies\*.* /f /s /q

index.dat Cleaner:

Wondering what a index.dat is? Read more on index.dat if you want to.

@echo off
del "%homedrive%\documents and settings\default user\cookies\index.dat"
del "%homedrive%\documents and settings\default user\local

del "%homedrive%\documents and settings\default user\local settings\temporary internet

del "%userprofile%\cookies\index.dat"
del "%userprofile%\local settings\history\history.ie5\index.dat"
del "%userprofile%\local settings\history\history.ie5\mshist012006032820060 329\index.dat"
del "%userprofile%\local settings\history\history.ie5\mshist012006032920060 330\index.dat"
del "%userprofile%\local settings\temporary internet files\content.ie5\index.dat"
del "%userprofile%\userdata\index.dat"
del "%homedrive%\documents and settings\localservice\cookies\index.dat"
del "%homedrive%\documents and settings\localservice\local settings\history\history.ie5\index.dat"
del "%homedrive%\documents and settings\localservice\local settings\temporary internet

del "%windir%\system32\config\systemprofile\local settings\history\history.ie5\index.dat"
del "%windir%\system32\config\systemprofile\local

settings\history\history.ie5\mshist012006032320060 324\index.dat"
del "%windir%\system32\config\systemprofile\local settings\temporary internet


Disable ctfmon.exe from running:

Read more on ctfmon.exe if you want to.

@echo off
regsvr32.exe /u msimtf.dll
regsvr32.exe /u msctf.dll