Categories

Links

Clear the Temporary Internet Files using the Windows XP Disk Cleanup utility

Published: May 02, 2005
Updated : June 15, 2005
Send your feedback

Introduction

Clearing the Temporary Internet Files is one of the most frequent tasks than anything else, for most users. This article explains you how to clear the Temporary Internet Files using the Disk Cleanup utility, Automate the cleanup task, and explains you how to add a cleanup button to the Internet Explorer standard toolbar for people who need to clear the Temporary Internet Files cache very frequently.

Note:  Method described in this article will not clear the _entire_ contents of the CONTENT.IE5 and it's sub-folders. CONTENT.IE5 contains sub-folders which store the offline content, such as the temporary files generated by Help and Support Center / Outlook Express or other products. Those offline files are not cleared by Disk Cleanup. If you want to clear the CONTENT.IE5 completely, including the zero byte files, you'll need to use the Internet Options applet in the Control Panel. Be sure to put a checkmark near Delete all offline content.

Thanks to Wesley Vogel, Microsoft MVP [Windows Shell] for the above information.

The Disk Cleanup tool helps you free up space on your hard disk by searching your disk for files that you can safely delete. You can choose to delete some or all of the files. Use Disk Cleanup to perform any of the following tasks to free up space on your hard disk:

Clear the Temporary Internet Files using Disk Cleanup

The Temporary Internet Files cache is now emptied.

Automate the above task by creating a Sageset configuration (optional)

The above task can be automated by using the Cleanmgr.exe's Sageset parameter. You can read more about it in this page. To automate the above task, use these steps:

cleanmgr /d G: /sageset:50

NOTE: /d parameter is used to specify the drive-letter. The above command assumes that the current Windows installation is in G:\. If not, change the drive-letter/Path accordingly.

cleanmgr /sagerun:50

NOTE: When using /sagerun, you don't need to specify the drive-letter, as the drive-letter configuration is already stored in the registry (using Step 1 - using the /d parameter)

Now, you've automated the Procedure 1 in the top of the page. Whenever you wish to clear the Temporary Internet Files cache, you just need to run cleanmgr /sagerun:50 command from Start, Run dialog.

Add a button to Internet Explorer standard toolbar (optional)

After you created a sageset configuration as explained in the previous step, you can now create a Internet Explorer toolbar button that launches cleanmgr /sagerun:50 command every time when you click the button.

The toolbar button is now added, but may not be visible by default in Internet Explorer toolbar. Open Internet Explorer. Click the View menu, Toolbars, and choose Customize. Select Clear Temporary Internet Files button and add it to the list.

The Clear Temporary Internet Files button will now appear in the Internet Explorer standard toolbar (with the Recycle Bin icon assigned to it, that you can change it in the registry if you want to). Clicking this button will launch the VBScript that you downloaded, which in-turn calls the Cleanmgr.exe command with the needed parameters.

Additional step for Windows XP SP2 users: Right-click the downloaded .VBS file, and then choose Properties. Click the Unblock button, and click OK. This prevents the Open File - Security warning from being displayed for this script.

How to remove the Internet Explorer toolbar button?

Delete the two files [ ClearTif-button.reg and ClearTif.vbs ] that you downloaded. Then, to remove the button entry in Internet Explorer, you can use ToolbarCop. Start ToolbarCop, and delete the following entry:

Clear Temporary Internet Files - {7A8B2368-E336-49C5-A762-0FF3E7E09DDB}