Defragmentation organizes the data on your hard drive so that Windows can get to it quicker. Vista constantly runs the service in the background, but XP users do !Jot have this luxury. If you are using XP, you can make sure that the drive is regularly defragmented and your resources are managed well, by having the defrag tool run in the background whenever your screensaver timeout is activated. This also ensures that your computer isn't occupied with background tasks when you are actually using it. To set it up, you need to tinker around and type out a small batch file, which you will later execute using a small utility called RunSaver. Open Notepad from Start I All Programs I Accessories' and enter the folloWing command:
With this simple script, you instruct Windows to defragment the system drive "C". Adding the parameter "-f" removes the need for the user to intervene so that the program can just start on its own.
If you want to clean up other drives, repeat the line and replace "C:" with the letter of any desired drive. Save the file with a name like "AutoDefrag" and the extension BAT.
Now, copy the file to "\Windows\ system32", so that you can activate it as a screensaver. Under 'Start I Control Panel I Display 1 Screen Saver", select RunSaver as the active screen saver and then click the 'Settings' button. Enter the path for the batch file you just created in the 'Command' field of the dialog box that pops up. As soon as the computer has a few minutes idle, the screen saver is activated and the optimization routine is triggered. It stops when you move the mouse or press a button, just like any screen saver. Of course the defragmentation starts all over again the next time your computer is idle, but the hard disk is not affected adversely.
Before you configure a screen saver defragmentation routine, you should clean the hard disk manually once. This way, subsequent runs only need a few minutes, and will invariably complete when your PC is idle. You can run the Defrag tool manually by clicking 'Start I All Programs I Accessories I System Programs I Defragmentation'.