Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clearing Internet Explorer files and other temporary files
#1
Hi I was wondering if there was a quick way to clear Internet History, Delete Files, Delete Cookies, and Delete all offline content files. I run on IE6 this would be great.
#2
Could be used del, but it requires knowledge where these files (and maybe also registry settings, etc) are, and what files must be deleted and what files leaved, which I don't have. I probably would rather record what I do manually.
#3
Ok well if your not sure about those is there a way to clean temp files???
#4
Code:
Copy      Help
spe
out
out "DELETE FILES"
Dir d
foreach(d "$temp$\*" FE_Dir 0x4)
,str sPath=d.FileName(1)
,out sPath
,del- sPath; err

out "DELETE FOLDERS"
foreach(d "$temp$\*" FE_Dir 0x1)
,sPath=d.FileName(1)
,out sPath
,del- sPath; err
#5
and this is how to empty Recycle Bin

Code:
Copy      Help
SHEmptyRecycleBin 0 0 SHERB_NOCONFIRMATION
#6
You can use Windows disk cleanup tool.

At first run this macro:
Code:
Copy      Help
run "cleanmgr.exe" "/sageset:100" "" "" 0x10400

It does not delete any files but rather shows a dialog where you can select what files must be deleted when you run the second macro.

Then run this macro:
Code:
Copy      Help
run "cleanmgr.exe" "/sagerun:100" "" "" 0x10400

The second macro deletes files specified when you ran the first macro. It does not require user interaction, and therefore can run unattended, for example scheduled.

The settings you have made while you ran the first macro are associated with the number 100. It can be any number between 0 and 65535. For example, you can use number 100 to delete Temporary Internet Files, number 101 to delete Temporary Files and Recycle Bin, etc. Use the same number in both macros.

Note that you have to run macro1 only once (for each different number), unless you want to change settings. Then you can run macro2 multiple times, at any time.

The code in another post that deletes temp files works better than cleanmgr. It deletes all files that are not locked, while cleanmgr leaves many files if some files are locked.

Tested on XP and Vista.
#7
Thanks for your help!


Forum Jump:


Users browsing this thread: 2 Guest(s)