oROEchimaru
Supreme [H]ardness
- Joined
- Jun 1, 2004
- Messages
- 4,662
It seems to work fine at my work. creating a script to clean up temp files on machines that have more than one user..this should be run on an account with admin rights.
cleans up java, prefetch, temp files and temporary internet files.
-works fine on one machine. just want to see if its actually deleting anything on another. on my machine, it doesnt delete everything, ccleaner still has to clean up my pc it is odd. i might need to make an addtional script for local user
** update**
seemed to work on a user's machine.
-however on my machine with ie8, it deletes the folder but the files are still there its like they are invisible but ccleaner can still delete them. similiar to when a virus makes a folder invisible even if you show hidden files
save as .cmd
cleans up java, prefetch, temp files and temporary internet files.
-works fine on one machine. just want to see if its actually deleting anything on another. on my machine, it doesnt delete everything, ccleaner still has to clean up my pc it is odd. i might need to make an addtional script for local user
** update**
seemed to work on a user's machine.
-however on my machine with ie8, it deletes the folder but the files are still there its like they are invisible but ccleaner can still delete them. similiar to when a virus makes a folder invisible even if you show hidden files
save as .cmd
Code:
@echo off
title Cleanup utility - must use an admin account - %computername% (ver. 2009-11-19)
rem ===================================================================
rem Cleans temp files, temporary, prefetch and java cache
rem ===================================================================
rem ===================================================================
color 17
set Lokal_sti=Lokale~1
rem tjek sprog (engelsk?) via pause kommandoen
echo a | pause | find "any key" >nul
IF %errorlevel% EQU 0 set Lokal_sti=Locals~1
echo Type Ctrl-C to stop and exit, press Enter until each phase is completed
echo This program will clean up each individual's temporary files unlike ATF/Ccleaner
echo Like ATF, this requires the admin account
pause
rd c:\windows\TEMP /s /q
md C:\windows\TEMP
echo windows temp files cleaned
pause
rd c:\windows\Prefetch /s /q
md C:\windows\Prefetch
echo windows prefecth folder cleaned
pause
for /d %%i in ("c:\documents and settings\*") do call :DelInet "%%i"
pause
goto :eof
:DelInet
echo Nu slettes data for: %~1
for /d %%j in ("%~1\%Lokal_sti%\Temporary Internet Files\Content.IE5\*") do call :DelTDir "%%j"
del "%~1\%Lokal_sti%\Temporary Internet Files\Content.IE5\." /q /a
echo ie temporary internet files cleaned
for /d %%j in ("%~1\%Lokal_sti%\Temp\*") do call :DelTdir "%%j"
del "%~1\%Lokal_sti%\Temp\." /q /a
echo local user temp files cleaned
for /d %%j in ("%~1\%Lokal_sti%\Temporary Internet Files\*") do call :DelTDir "%%j"
del "%~1\%Lokal_sti%\Temporary Internet Files\." /q /a
for /d %%j in ("%~1\%Lokal_sti%\Temp\Temporary Internet Files\Content.IE5\*") do call :DelTDir "%%j"
del "%~1\%Lokal_sti%\Temp\Temporary Internet Files\Content.IE5\." /q /a
for /d %%j in ("%~1\%Lokal_sti%\Temp\Temporary Internet Files\*") do call :DelTDir "%%j"
del "%~1\%Lokal_sti%\Temp\Temporary Internet Files\." /q /a
echo clearing Every user's java cache folder
for /d %%j in ("%~1\Application Data\Sun\Java\Deployment\javaws\cache\*") do call :DelTDir "%%j"
del "%~1\Application Data\Sun\Java\Deployment\javaws\cache\." /q /a
for /d %%j in ("%~1\Application Data\Sun\Java\Deployment\cache\*") do call :DelTDir "%%j"
del "%~1\Application Data\Sun\Java\Deployment\cache\." /q /a
for /d %%j in ("%~1\Application Data\Sun\Java\Deployment\cache\6.0\*") do call :DelTDir "%%j"
del "%~1\Application Data\Sun\Java\Deployment\cache\6.0\." /q /a
echo ===================================================================
goto :eof
:DelTDir
echo Sletter %~1
del "%~1\." /q /a
rd "%~1"
goto :eof
Last edited: