Automate Disk Cleanup in Windows XP
The Disk Cleanup tool in Windows XP can be use to setup for automated runs.
Setting Up
Run The Clean Up Using Saved Setting
echo off
echo Start at
date /T
time /T
rem cleanmgr /sageset:1
cleanmgr /sagerun:1
echo ################################
echo # Disk clean up has completed! #
echo ################################
echo Stop at
date /T
time /T
pause
--------Stop Copy From Above---------
Setting Up
- Goto Start > Run
- Run this command:
cleanmgr /sageset:1 - Setup your clean up options and click OK. This will save your options setting to "1". The set numbers can be from 0 to 65535.
Run The Clean Up Using Saved Setting
- Goto Start > Run
- Run this command:
cleanmgr /sagerun:1 - The Disk Clean Up tool will run without any interactive prompts.
Automate It
Below is a batch file that i have created for myself to schedule to run the Disk Cleanup tool during midnight on my office PC.
-------Start Copy From Below--------
echo off
echo Start at
date /T
time /T
rem cleanmgr /sageset:1
cleanmgr /sagerun:1
echo ################################
echo # Disk clean up has completed! #
echo ################################
echo Stop at
date /T
time /T
pause
--------Stop Copy From Above---------
Comments
Post a Comment