Currently, with the rapid growth of broadband, the need of more available hard disk space arises as a very important problem to be resolved for all PC users. If there is not enough available hard-disk space, some messages will pop up like “unable to create the specified connection” or “cluster configuration cannot proceed”.

So a system cleanup is needed to always optimize PC performance. It’s known that we can use Microsoft’s built-in Disk Cleanup utility to scan the hard disk and then delete some unwanted Internet temporary files and some useless files from recycle bin. But rare people realize that windows Prefetch folder always takes large amount of disk space. From Microsoft website, we know that prefetching boot files and applications can decreases the time needed to start Windows XP and other applications. But when trying to take this action it is necessary to go through all system data, and the data which was accessed will be recorded in the hard disk, which takes up large amount of disk space. As times by, Windows XP will become sluggish because of insufficient available hard-disk space.

So how to effectively clean up these useless files? Here, a simply way will be discussed to ensure an effectively system cleanup, that is, edit a script.

1) Run Notepad, and then edit the below command lines (pretend that Windows XP is installed under C:\Windows)

11

       c:\windows\system32\cleanmgr.exe /dc /sageset:1
     c:
  cd\
  cd c:\windows\prefetch
  del *.* /q
(Note: the last two lines are used to clean up the windows Prefetch folder)

2) Save the file as “*.bat” and store on that hard disk such as C:\ cleanup.bat.
3) Right click the just created “cleanup.bat” item to open “Disk Cleanup Settings” wizard. Here, you can check the items to be cleaned up.

22

4) After that, right click the icon of “cleanup.bat” and select “Edit” to change the first line to “c:\Windows\system32\cleanmgr.exe /dc /sagerun:1”.Hence, when clicking it, it will automatically run a system cleanup operation but not the wizard of  “Disk Cleanup Settings”.

33

5) If you want to timing run “cleanup.bat” to clean up system, please go to Control Panel -> Scheduled Tasks -> Add Scheduled Task –> select “cleanup.bat” and then set the time when to run this system cleanup operation. 

With the simple ways above, you can effectively clean up the system junk files at a scheduled time effectively, which releases more available free disk space and saves your time. 

But it is greatly recommended that you can run a disk defragmentation after the system cleanup. As we delete or move files from the hard disk, there must be some gaps left behind, which make the hard disk fragmented it can not be defragmented at time. A defragmentation is a process which can rearrange the files on the computer, making them always stay at the same single place and much easier to be accessed to and then optimize PC performance. 

In conclusion, we can ensure a timing and effective system cleanup with simple scrip to release hard disk space, but please not that another simple process — disk defragmentation is also needed in order to maintain hard disk and optimize PC performance.