Like HowStuffWorks on Facebook!

How to Defrag Your Hard Drive

        Tech | How-to Tech

Windows Defrag
The Windows XP defragmentation program provides a visual display of the reduction in fragmented files. Note that there are virtually no red lines in the bottom representation.
The Windows XP defragmentation program provides a visual display of the reduction in fragmented files. Note that there are virtually no red lines in the bottom representation.
­Screenshot by Peter May­

­

­

­Defragmenting your hard drive is relatively simple, but can use significant system resources, so it's better to do it when the computer isn't in use. Every version of Windows has a built-in defragmentation utility. These programs are actually subsets of third-party applications, such as Executive Software's Diskeeper. The complete Diskeeper software package includes additional capabilities, such as scanning one drive while defragmenting another. For most users, however, the Windows utility has all of the functionality required to get the job done.

Using the Windows onboard defragmentation utility is simple. Here's how to launch the program:

In Windows XP (any variety):

  • Open My Computer.
  • Right-click the local disk volume you wish to defragment.
  • Click Properties.
  • On the Tools tab, click Defragment Now.
  • Click Defragment.

­There are several limitations to the defrag function in XP. For instance, it's only possible to defrag one volume at a time. The utility does not include a scheduling function, however, it is possible to use the Windows Scheduler utility to run Defrag from the command line. This is a somewhat complicated process and it's really only appropriate for advanced users and IT professionals. Information is available on microsoft.com.

­­The Defrag utility in Widows Vista makes it easy to schedule and control the process.
­­The Defrag utility in Widows Vista makes it easy to schedule and control the process.
­Screenshot by Peter May

­

­In Windows Vista, type "defrag" into the start ­menu search box and press­ Enter. Note that you must be logged in as an administrator to run the Defrag utility.­

The Vista Defrag utility is easier to use and offers some significant advantages over the XP version. When you launch the application using the above command, you'll be presented with a screen that allows you to control many aspects of the defragmentation process. The most useful of these is the ability to schedule defragmentation to run at a time that is convenient for you.