After using windows for a while, you’ve probably notice that as time goes by your machine becomes slower. One of the reasons for that is that the disk becomes fragmented.
The easiest method to defrag is by going to the accessories menu and run the defrag program provided by Microsoft. But using the GUI takes more resources and CPU from your system, thus takes longer to finish.
Another way to run the defrag program is using the command line. By using the command line, the program only using your system resources to defrag the disk and not to manage the GUI.
To run the defrag program from the command line follow these steps.
Go to Start->Run and type cmd
In the command prompt window type defrag
You can learn about all the defrag option by typing defrag -?
Note: The command prompt application does not display any progress indication so be patient.
If the system complains about the drive you might want to try and start your system in safe mode with command prompt option, and run defrag then.