Unattended Disk Cleanup

This article will show you how to create  a simple batch program that can easily clean your disk. This cleanup script will also clear windows prefetch directory. This folder becomes cluttered with old application. performing this cleanup would free up some free space.

Step 1.

Create a new text file and place the following contents inside:

c:\windows\system32\cleanmgr.exe /dc /sageset: 1
c:
cd \
cd c:\windows\prefetch
del *.* /q

Step 2.

Save the file, change the extension from .txt to .bat and name  it clean.bat or whatever filename you prefer.


Step 3.

Execute the file. This will run the Disk Cleanup program in a special mode which asks what items you will want cleaned when Disk Cleanup performs an unattended cleanup. Check the items you wish to have cleaned up, then click OK.

Step 4.

Right-click on the clean.bat file and click edit. Change the first line to read:

c:\windows\system32\cleanmgr.exe /dc /sagerun: 1

Step 5.
Save the file. You can execute this file in place of running Disk Cleanup, or, to have this program run unattended, run the Add Scheduled Task Wizard in the Control Panel and create a scheduled task using the clean.bat file you just created.

SHARE THIS ARTICLE
  • BlinkList
  • del.icio.us
  • Digg
  • Facebook
  • LinkedIn
  • Mixx
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter

Related posts:

  1. How to Add Disk Cleanup to the Right-Click Menu of your Drive
  2. How to Simply Lock and Unlock your Folder
  3. How To Speed Up Disk Access by Disabling Windows XP Last Access Updating
  4. Quick Shutdown
  5. How to send messages using command prompt
  6. How to Disable or Enable Your Task Manager
  7. How to Change The Default Location For Installing Applications
  8. How to enable missing Hibernate on Windows Vista
  9. How to Add Encrypt/Decrypt to your Vista right Click Menu
  10. How to effectively increase Vista performance

TAGS: , , , , ,
PBX Phone System

0 Comments



You can be the first one to leave a comment.

Leave a Comment


CommentLuv Enabled

Spam Protection by WP-SpamFree