Thursday, January 20, 2011

How to Automate the Disk Cleanup Tool in Windows XP

Open a command line window, then launch Cleanmgr.exe /sageset: n to choose the clean-up option. The n variable can be a number from 0 to 65535. When finish press the "Ok" button.
The command Cleanmgr.exe /d C: /sagerun: n perform a full clean-up of the c: drive with the options you set previously.

Now you can easily schedule this operation with a simple cmd file.

No comments: