How to Defragment Your Disk

When you add files to a new disk, they're stored together, with a large continuous area of free space at the end. As files are added and removed from your computer, two things happen:

  • Firstly, as files are removed, you get small, isolated areas of free space scattered throughout the disk.
  • Secondly, instead of being stored on disk in one piece, individual files can become fragmented – split across multiple locations on the disk. This can happen if a file needs to expand (because you've added content to it), but the part of the disk immediately following that file is already in use.
Shows how defragmentation can occur.

The end result is that your computer's performance is degraded. When it needs to access a file that is fragmented, it's obviously less efficient to have to read it from multiple different areas of the disk.

Thankfully, these effects can be minimized by running the Disk Defragmenter, which attempts to correct these problems.

In Windows XP, defragmentation is not scheduled to run periodically, so you'll either have to run it manually, or set it up to run as a scheduled task (see the section on How to Create a Scheduled Task).

If you run the disk defragmenter from the Start menu -> All Programs -> Accessories -> System Tools -> Disk Defragmenter, you'll see a window like the one below.

Shows the main disk defragmentation window.

This allows you to pick the drives that you want to defragment. After making a selection and clicking the "Analyze" button, you'll see the following window.

Shows the results of the defragmentation analysis.

This shows you the degree of fragmentation that currently exists, and gives you the option of viewing a report which gives more detail, going ahead with defragmentation, or exiting. The report provides details on the fragmented files and their locations.

Shows the defragmentation analysis report.

If you're running the defragmenter, bear in mind that it takes a long time (it could take several hours). So make sure you pick a time when you're not going to need your computer for a while.

<-- Previous Page

Cleanup Your Disk

Next Page -->

Check Your Disk for Errors