Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Closed Thread
  #1  
Old 11-19-2009, 12:16 PM
jerger jerger is offline
Registered User
 
Join Date: 05 Nov 2009
Location: milwaukee
MS Office Version:Excel 2003
Posts: 35
jerger is becoming part of the community
cleanup script not deleting ie subfolders

Please Register to Remove these Ads

Basically i want the script to cleanup not only the temporary internet cache, but also the subfolders within this folder. it appears to delete them but if you copy/paste the file path they are still there.

example of subfolders not deleted: (the folder is 1y676dfn)
-if i got to the file path its empty
-if i run ccleaner, it then deletes the file since its still there
-hidden files are visible along with sys files

C:\DOCUME~1\jroe1\LOCALS~1\Temp\Temporary Internet Files\Content.IE5\1Y676DFN\6[2].jpg 2 KB

C:\DOCUME~1\jroe1\LOCALS~1\Temp\Temporary Internet Files\Content.IE5\1Y676DFN\6[3].jpg 2 KB

C:\DOCUME~1\jroe1\LOCALS~1\Temp\Temporary Internet Files\Content.IE5\1Y676DFN\6[4].jpg 3 KB


*** 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
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
  #2  
Old 11-19-2009, 03:20 PM
teylyn's Avatar
teylyn teylyn is offline
Forum Moderator
 
Join Date: 28 Oct 2008
Location: German in New Zealand
MS Office Version:2000 - 2010
Posts: 4,688
teylyn makes giving solutions look like childsplay teylyn makes giving solutions look like childsplay teylyn makes giving solutions look like childsplay teylyn makes giving solutions look like childsplay teylyn makes giving solutions look like childsplay teylyn makes giving solutions look like childsplay teylyn makes giving solutions look like childsplay teylyn makes giving solutions look like childsplay teylyn makes giving solutions look like childsplay
Re: cleanup script not deleting ie subfolders

Huh? You sure you're in the right forum? This is the Water Cooler in the Excel forum. Your question is about DOS batch processing.
__________________
teylyn
If you want to say Thank you to a member, click the reputation icon in the title bar of the post you liked
Everyone needs a pat on the back every once in a while!
...How to Cross-post politely...
Things I do with the right side of my brain ...
  #3  
Old 11-19-2009, 03:23 PM
Paul's Avatar
Paul Paul is offline
Forum Moderator
 
Join Date: 05 Feb 2007
Location: Wisconsin, U.S.A.
MS Office Version:2007
Posts: 3,882
Paul is very confident of their ability Paul is very confident of their ability Paul is very confident of their ability Paul is very confident of their ability Paul is very confident of their ability
Re: cleanup script not deleting ie subfolders

While this section of the forum is not Excel-specific, it's really not the place to be asking questions of a technical nature for other applications either. Try searching the web for DOS/command line scripting.
__________________
- Paul

Click here to read the Forum Rules

To give a virtual "pat on the back" click the icon in the gray toolbar from that user's post.
To report abuse, spam or offensive posts, please click the icon.


Closed Thread

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump