Tuesday, October 13, 2009

configure schedule smart disk cleanup in xp

This tip will show you how to create smart disk cleanup, to do this we need to create one batch file, please note that this will clear prefetch files also. follow these steps.
  • Create new text document
  • Type or copy the following inside text document
  • c:\windows\system32\cleanmgr.exe /dc /sageset: 1
    c:
    cd \
    cd c:\windows\prefetch
    del *.* /q
  • Now save the text file and change the extension of the file from .txt to .bat (ex - cleanup.bat)
  • Now open the bat file you created, this will open disk cleanup settings window
  • In here select the options (by clicking check box) you want to configure for disk cleanup
  • Click ok
  • Now open the bat file again for editing (right click the file and click edit)
  • Change the first line to c:\windows\system32\cleanmgr.exe /dc /sagerun: 1
  • Save the file
  • Execute file for disk cleanup
You can also add schedule task for smart disk cleanup
  • Open schedule task folder (start > run > type tasks > press enter)
  • Double click add schedule task
  • Click next
  • Click browse button
  • Specify the disk cleanup bat file we created
  • In the name field type anything, and select the action under "perform this task"
  • Now proceed with the schedule task, and click finish at the end.

No comments:

Post a Comment