Defragmenting a Hard Drive

by Barry Dysert
(last updated November 10, 2014)


Bob started to notice that, as of late, his system has gotten a bit sluggish. He mentioned it to a friend, and she said that he should check into defragmenting his hard drive. While she explained a little bit about what this means, they ran out of time before she could tell him how to actually defragment. Bob is wondering how to go about defragmenting his hard drive.

Defragmenting a disk can be an effective way to improve your system's performance—at least for mechanical drives. Windows does not defragment solid-state drives, as doing so can accelerate them wearing out.

Through the normal course of use, the performance of mechanical disks can degrade from having lots of contiguous space to having that space split into pieces that the operating system must keep track of every time it needs to access a file. Defragmenting a disk essentially groups files and pieces of files into contiguous space again so that disk access is improved.

By default, automatic disk defragmentation is turned on in Windows so that you usually don't have to concern yourself with it. It is possible in Bob's case that automatic defragmentation is turned off, or he wouldn't have noticed a progressive sluggishness to his system. If you wish to change the defragmentation schedule, want to perform a manual defragmentation, or otherwise are just curious about the condition of your disks, you can launch the defragmenter and investigate.

There are several different ways you can start the disk defragmenter tool that is provided with Windows; all of them lead to the same point. Here are the methods to start the defragmenter in Windows 7:

  • Click Start | Computer and then right-click on the drive you want to defragment. In the resulting Context menu, click Properties to display the drive's Properties dialog box. Display the Tools tab and click Defragment Now.
  • Click Start | All Programs | Accessories | System Tools | Disk Defragmenter.
  • Click Start | Control Panel | System and Security. Under the Administrative Tools category, click Defragment Your Hard Drive.

If you are using Windows 8, start the Control Panel (use any of the common ways of doing this), then click System and Security. Scroll down, and under the Administrative Tools category you'll see a link to Defragment and Optimize Your Drives.

Once the defragmenter is running, you'll see its window. The appearance of the window differs a bit depending on your version of Windows. Here's how the window looks in Windows 7: (See Figure 1.)

Figure 1. The Disk Defragmenter window.

If you are using Windows 8, the Optimize Drives window looks like this: (See Figure 2.)

Figure 2. The Optimize Drives window.

The information displayed in the Disk Defragmenter or Optimize Drives window on your system will necessarily be different than what you see in these examples. You can tell a few things from this information:

  • When automatic defragmentation is set up to run. (In the Windows 7 example it is set to run every Wednesday at 1:00 a.m. In the Windows 8 example it is set to run weekly, but a day and time is not indicated.)
  • When defragmentation will next run. (Only in Windows 7.)
  • What the current fragmentation status is of your disk drives.

If you want to change the defragment schedule, click the Configure Schedule button in Windows 7 or the Change Settings button in Windows 8. Windows 7 displays the Modify Schedule dialog box. (See Figure 3.)

Figure 3. The Disk Defragmenter scheduling window.

In Windows 8 you'll see a very similar dialog box, the only difference being that you cannot specify a day and time for the schedule. The dialog boxes allow you to turn off automatic defragmentation (which is not recommended), change how often the defragmenter runs, when it runs (again, only in Windows 7), and what disks it runs on. If you change any of the settings, click OK to return to the previous window.

In the Disk Defragmenter or Optimize Drives dialog box you can analyze the current state of each of your disk drives by selecting the disk to be analyzed and clicking the Analyze Disk button (Windows 7) or the Analyze button (Windows 8). When you do, the information in the dialog box is updated to show that an analysis is underway. After a few minutes, the analysis completes and you may see a change in the "% fragmented" value for that disk. Assuming you're doing defragmentation regularly, the change probably won't be big, but you nevertheless have the opportunity to manually do a defragmentation pass on it immediately. This is done by clicking the Defragment Disk button (Windows 7) or the Optimize button (Windows 8).

Manually performing a defragmentation causes a re-analysis of the disk, and then the actual defragmentation process begins. You are continually updated on the progress of the process, and after a while (depending upon how much work there was to do) the process will end, and your disk will once again be defragmented.

Incidentally, if at any time (whether you're doing an analysis or an actual defragmentation) you want to stop the process, you can safely click the Stop Operation button without fear of data corruption.

 This tip (12144) applies to Windows 7 and 8.

Author Bio

Barry Dysert

Barry has been a computer professional for over 35 years, working in different positions such as technical team leader, project manager, and software developer. He is currently a software engineer with an emphasis on developing custom applications under Microsoft Windows. When not working with Windows or writing Tips, Barry is an amateur writer. His first non-fiction book is titled "A Chronological Commentary of Revelation." ...


Adjusting the Mouse for Left-Handed Users

Since Windows is so customizable, it should come as no surprise that Microsoft has made accommodations for left-handed ...

Discover More

Agent Ransack

If you need to search the contents of files fast, Agent Ransack is a tool worth having. It searches through multiple ...

Discover More

Searching From within File Explorer

Searching from within File Explorer is a quick and easy way to find files and even content within files. This tip shows ...

Discover More
More WindowsTips

Displaying Details about an Audio File

Audio files have additional attributes that other files don't have. This tip describes how you can display these ...

Discover More

Changing User Permissions for a File

All objects on your computer (e.g., files) have permissions that allow or deny various types of access. This tip shows ...

Discover More

Removing Locations from the Search Index

You can fine-tune Indexed Searches by removing locations from the search index. This tip tells you how.

Discover More

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is six minus 3?

2017-12-11 10:33:04

Roy Taylor

I have read somewhere that you should not defeat SSD drives. Is this true?

Newest Tips

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.