copy - past into notepad and save as TempClean.bat
Single User:::
Single user:::
copy - past into notepad and save as TempClean.bat
+++++++++++++++++++++++++++++
rem clean.bat
rem created by Grelfod May 2008
rem updated by Grelfod Aug 2010
rem consolidated by FalconFour Aug 2010
rem to clean temp files from LOGGED IN user.
rem this folder usually contains the temp files from installs and
rem should be deleted by the apps that placed them there - ya right.
rd /s /q "C:\WINDOWS\Temp" & mkdir "C:\WINDOWS\Temp"
rem remove TEMPORARY INTERNET FILES folder and all its contents
rem remove FIREFOX CACHE folder and all its contents
rem remove JAVA CACHE folder and all its contents
rd /s /q "%userprofile%\Local Settings\Temporary Internet Files"
mkdir "%userprofile%\Local Settings\Temporary Internet Files"
rd /s /q "%userprofile%\Local Settings\Application Data\Mozilla\Firefox\Profiles"
rd /s /q "%userprofile%\Application Data\Sun\Java\Deployment\cache"
mkdir "%userprofile%\Application Data\Sun\Java\Deployment\cache"
rem this will clear the users temp files. All the stuff left in there is left over from
rem installers and other programs that ran under your account.
rd /s /q "%temp%" & mkdir "%temp%"
This folder has typically been used to hold downloaded installs like LN, Real Player, etc.
rd /s /q "C:\Temp"
rem this will clear the recycle bin
rd /s /q "C:\RECYCLER"
rem This will clear out the prefetch
cd /d C:\WINDOWS\Prefetch
rd /s /q "C:\WINDOWS\Prefetch" & mkdir "C:\WINDOWS\Prefetch"
Multi User:::
++++++++++++++++++++++++++
==========================
++++++++++++++++++++++++++
and the MultiUser_Cleaner
(save as a .bat file)
++++++++++++++++++++++++++
rem this batch file will identify all user names (profiles) in C:\documents and settings
rem it will then clean out the users \local settings\internet temporary and \local settings\temp folders
rem remaking folders that it may have deleted.
rem This version will not delete folders / files that are in use when it is run
rem by Grelfod
rem tested and working - Aug 1, 2008
rem added Java Cache Jan 9, 2009
rem added cleaning Firefox Cache July 21, 2009
rem updated Aug 5, 2010
rem this is ver 6
rem consolidated by FalconFour Aug 2010
rem could use %systemdrive% instead of C:\ if C: was not sys drive
rem find names of all users in documents and settings...
rem ...and remove TEMPORARY INTERNET FILES folder and all its contents & recreate folder...
rem ...remove FIREFOX CACHE folder and all its contents...
rem ...remove TEMP folder and all its contents & recreate folder...
rem ...and remove JAVA CACHE folder and all its contents & recreate folder
FOR /d %%A in ("C:\Documents and Settings") DO (
rd /s /q "%%A\Local Settings\Temporary Internet Files"
mkdir "%%A\Local Settings\Temporary Internet Files"
rd /s /q "%%A\Local Settings\Application Data\Mozilla\Firefox\Profiles"
rd /s /q "%%A\Local Settings\Temp"
mkdir "%%A\Local Settings\Temp"
rd /s /q "%%A\Application Data\Sun\Java\Deployment\cache"
mkdir "%%A\Application Data\Sun\Java\Deployment\cache"
)