Well I made the things, though I might as well show them. I guess posting them here makes them just that lil bit less pointless (for me to make), lol.
Best say first that im aware there is "propper" software with much better functionality than my batch files, I only make these for fun. Also, if anyone does choose to use or try these batch files, please only do so if you know what they are doing. They have only ever been tested on my WinXP machine. Feel free to ask any questions you may have about these files, I'll try to answer as best I can.
Ok, so here is the first:
I call this "Clean up XP". It will either delete all Windows temp files or all IE temp files. The IE cleaning option will also turn the index.dat files into a Zero byte file prior to deletion. The Windows temp file deletion option should be used with care, and only used once every 2 to 3 months or so, maybe even longer.
TITLE Clean up XP
COLOR 1F
@ ECHO OFF
:start
CLS
ECHO.
ECHO **********************
ECHO * Clean up XP *
ECHO * ---------------- *
ECHO **********************
ECHO.
ECHO.
ECHO Please choose from the folowing options...
ECHO.
ECHO 1: Clean Internet Explorer Temp folders
ECHO 2: Clean Windows Temp files/folders
ECHO 3: Exit program
echo.
SET /P choice=CHOICE:
if %choice% equ 1 goto IE
if %choice% equ 2 goto Win
if %choice% equ 3 (EXIT) else (
ECHO.
ECHO Error "%CHOICE%" is not an option. Please try again...
PAUSE
GOTO start
)
:IE
if %OS% == Windows_NT (
TASKKILL /F /IM iexplore.exe /FI "STATUS eq RUNNING" >NUL
TASKKILL /F /IM explorer.exe >NUL && (
ping -n 3 127.0.0.1 >NUL
ATTRIB -S "%Systemdrive%\Documents and Settings\%Username%\Local Settings\Temporary Internet Files" >NUL
ATTRIB -S "%Systemdrive%\Documents and Settings\%Username%\Local Settings\Temporary Internet Files\Content.IE5" >NUL
ATTRIB -S "%Systemdrive%\Documents and Settings\%Username%\Local Settings\History" >NUL
ATTRIB -S "%Systemdrive%\Documents and Settings\%Username%\Local Settings\History\History.IE5" >NUL
ATTRIB -S "%Systemdrive%\Documents and Settings\%Username%\Cookies" >NUL
TYPE NUL > "%Systemdrive%\Documents and Settings\%Username%\Local Settings\Temporary Internet Files\Content.IE5\index.dat" >NUL
DEL /F /S /Q "%Systemdrive%\Documents and Settings\%Username%\Local Settings\Temporary Internet Files\*.*"
TYPE NUL > "%Systemdrive%\Documents and Settings\%Username%\Local Settings\History\History.IE5\index.dat" >NUL
DEL /F /S /Q "%Systemdrive%\Documents and Settings\%Username%\Local Settings\History\*.*"
TYPE NUL > "%Systemdrive%\Documents and Settings\%Username%\Cookies\index.dat" >NUL
DEL /F /S /Q "%Systemdrive%\Documents and Settings\%Username%\Cookies\*.*"
ping -n 3 127.0.0.1 >NUL
ATTRIB +S "%Systemdrive%\Documents and Settings\%Username%\Local Settings\Temporary Internet Files" >NUL
ATTRIB +S "%Systemdrive%\Documents and Settings\%Username%\Local Settings\Temporary Internet Files\Content.IE5" >NUL
ATTRIB +S "%Systemdrive%\Documents and Settings\%Username%\Local Settings\History" >NUL
ATTRIB +S "%Systemdrive%\Documents and Settings\%Username%\Local Settings\History\History.IE5" >NUL
ATTRIB +S "%Systemdrive%\Documents and Settings\%Username%\Cookies" >NUL
echo.
echo Operation Complete...
PAUSE
START explorer.exe
goto start
)
) else (
echo.
echo ERROR:This BATCH file is NOT intended for use on "%OS%" systems,
echo all batch operations will now terminate...
echo.
pause
EXIT
)
:Win
if %OS% == Windows_NT (
Taskkill /F /IM explorer.exe >NUL
ping -n 3 127.0.0.1 >NUL
DEL /F /S /Q %temp%\*.*
DEL /F /S /Q %Windir%\Temp\*.*
DEL /F /S /Q %Windir%\Prefetch\*.*
DEL /F /S /Q %Systemdrive%\*.tmp
DEL /F /S /Q %Systemdrive%\*.chk
DEL /F /S /Q %Systemdrive%\~*.*
pause
START explorer.exe
gogo start
) else (
echo.
echo ERROR:This BATCH file is NOT intended for use on "%OS%" systems,
echo all batch operations will now terminate...
echo.
pause
EXIT
)