Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clearing Internet Explorer files and other temporary files
#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.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)