Defragment your Hard Drive from the Command Prompt in Windows Vista

Mike's picture

image

I’m sure everyone who reads this blog knows how important it is to defragment your hard drive. If you didn’t know before now, then let me tell you, it’s important. Here’s a really easy way to make sure your hard drive is defragmented, using my good friend, the command prompt.

First off, you’ll need a administrative command prompt for the following steps. My favorite way to get one is to right click on the command prompt icon in Start > All Programs > Accessories, and then click “Run as Administrator”.

image

Now, we’re going to be using the defrag command line command.

If you would like to see how fragmented your hard drive is, just enter:

defrag c: –a

You’ll get a nice little report. If you don’t really care about the numbers, and you just want to degragment the drive, just enter the following to defragment every volume on your computer:

defrag –c

That’s all there is to it. If you want to get the most bang for your buck, then you can enter the following:

defrag –c –w

That command defragments all file fragments regardless of their size. You might not want to start this one until you’re going to be away from the computer for quite awhile.