How to Manually Defragment Your Hard Drive in Windows Vista

Windows Vista provides a good general Disk Defragmenter in its System Tools. But if you want to have more control over what is being defragmented and what information you are given about the process, you should try manually defragmenting your hard drive.

No doubt you’ve heard of “defrag” or “defragging” or “defragmenting” your hard drive. But to know why it’s important, you have to understand how fragmenting happens in the first place. Visualize a hard drive disk. Windows carves up the disk into lots of little spaces, like mailboxes. When Windows puts a file on the disk, it starts with the first open mailbox and pours the data from the file into the first box until the box is full. Then Windows goes on to the next available box, fills it up, and so on.

When you delete a file, you don’t delete the file or its data; Windows Vista doesn't delete the file, it moves it to a special folder called the Recycle Bin. Vista doesn’t actually free up the file’s mailboxes— until you empty the Recycle Bin. Over time, the boxes turn into a patchwork quilt, with files scattered in boxes located all over the drive — fragmented. Extensive fragmentation is bad because, when you open or want to use a file, Vista has to jump all over the disk to pull the pieces together.

When you defragment (or defrag) a hard drive, Windows rearranges the data on the drive so that each file is located in a single side-by-side block of mailboxes. With the files located contiguously, pulling data off the drive and into the computer takes less time.

If you want to dig deeper into the Disk Defragmenter, you can run the program from the Vista command prompt. When you do this, you can interact with the Disk Defragmenting program, getting answers to specific questions and giving it specific commands, such as asking whether your drive needs defragmenting or telling it to only defrag a single drive.

To access the disk defragmenter manually, you need to access the command prompt:

  1. Choose Start→All Programs→Accessories.

  2. Right-click Command Prompt and choose Run as Administrator.

    Vista makes you click Continue in a User Account Control dialog box, and then the command prompt comes up.

    image0.jpg

From the command prompt, you can type any of the following defrag commands to have the disk defragmenter run specific tasks.

Defrag Commands
This Command Does This
defrag d: -a Analyzes drive D: to see if it needs to be defragged
defrag c: -w Runs a full defragmentation of drive C:, consolidating all files whether or not they’re larger than 64MB
defrag -c -v Defrags all the drives (that’s what -c means) and produces a “verbose” (-v) detailed report
defrag -c -i -v Defrags all the drives and produces a verbose report, but only runs when the computer is completely idle (that’s what -i means)
blog comments powered by Disqus
Advertisement

Inside Dummies.com

Dummies.com Sweepstakes

Win $500. Easy.