Script to Delete Temporary Internet Files (ie6)

  • Thread starter Thread starter MatthewBrown
  • Start date Start date
M

MatthewBrown

Found this in another thread:

pushd "%userprofile%\Local Settings\Temporary Internet Files\"
del /a:sh *.*
for /f "Tokens=*" %%G in ('dir /B') do rd /s /q "%%G"
popd


But when I go to internet options>settings...>show files there are
still files.


I'm looking to make a scheduled task that is like a disk cleanup. It
will determine if the system is XP or 2k. If it's XP, cleanmgr
/sageset:0 will work. But if it's 2k, there's no cleanmgr, so I need
to script out the cleanmgr tasks (deleting temp inet files is one of
them).



Thanks!


Matt
 
1) There is a cleanmgr in Win2K.

2) IE must be closed when trying to delete fiels from the TIF.

3) Your DIR command needs the /a switch because some of the files and
folders will have the Hidden or System attributes.

4) You won't be able to delete everthing for the current user. In
particular, %UserProfile%\Local Settings\Temporary Internet
Files\Content.IE5\index.dat is always busy and cannot be deleted by the
current user unless extraordinary steps are taken
 
You can try our program Workspace Macro Pro. It has many pre-defined
utility type templates that can do exactly what you need.
http://www.tethyssolutions.com/everyday-automation.htm has Internet
Cleanup template. And
http://www.tethyssolutions.com/utilities-templates.htm has disk cleaner
template.

You can get more information and free trial download for Workspace
Macro Pro from http://www.tethyssolutions.com/macro-automation.htm

Tethys Solutions, Expert Services Group
http://www.tethyssolutions.com/ask-the-expert.htm
SMART Macro & Automation Solutions
 
Back
Top