|
Using XP's Internal
Disk Cleanup Utility - cleanmgr
Automated cleanup of Temp files,
Internet files, downloaded files, recycle bin (XP).
Syntax
CLEANMGR option
Options
/d driveletter: - Select the drive that you want Disk Cleanup to clean.
/sageset:n - Display the Disk Cleanup Settings dialog box and create
a registry key to store the settings you select.
The n value is stored in the registry and allows you to
specify different tasks for Disk Cleanup to run.
n can be any integer from 0 to 65535.
Specify the %systemroot% drive to see all the available options.
/sagerun:n - Run task 'n'
All drives in the computer will be enumerated, and the
selected profile will be run against each drive.
Procedure:
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.
-
Select Temporary Internet Files
from the list.
-

-
Uncheck OR check all the other
entries
-
Click OK to save the changes.
-
Now, the cleanup configuration is
stored in the registry. You can invoke the cleanup of Temporary
Internet Files by calling this saved configuration.
-
To do so, use this command from
Start, Run dialog:
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. Whenever you wish to clear the Temporary Internet
Files cache,
you just need to run cleanmgr
/sagerun:50 command from Start, Run dialog or run it as a
scheduled task.
|