A Better Disk Defragmenter Utility from Microsoft

Published in: command line - Downloads - freeware - utilities - Windows

disk defragmenter One of the reasons why your computer may become slow over time is because the files on the hard drive can become fragmented. Now what’s that?

Disk Fragmentation for Non-Techies

As you start filling your hard-drive with new programs, documents, and other files, the operating system tries to find vacant places on the hard-drive to place these files. Like an artist who breaks a tile into multiple pieces to form a mosaic, your computer will break these file into chunks (or fragments) and store them in different places across your hard drive.

When you load a program or open a file, the computer will have to first assemble these “fragmented” pieces thus decreasing the performance. And fragmentation is not just an issue with your computer’s hard disk but even removable devices like the USB Flash Drive or your external drives can also become fragmented with time.

Alternate Windows Disk Defragmenter from Microsoft

A Disk Defragmenter program helps because it will pre-arrange all the “fragmented” pieces of a file close together thus reducing the time it takes to open files or load programs on your computer.

Now almost every version of Windows includes a disk defragmenter utility but the problem with these built-in tools is that that will defragment the entire hard-drive at once and they’ll ignore files that are smaller than 64 MB. Luckily, Microsoft offers another free but lesser-known utility called Contig (short for contiguous) that lets you have more control over the defragmentation process.

Disk Defragmenter

What’s unique about Contig is that it lets you defragment individual files, folders, or the entire hard drive. You can run Contig from the command prompt but if that sounds a bit technical, you can also look at Power Defragmenter - an easy and more visual interface for Contig.

Using Power Defragmenter, you can visually select files, folders, or the drive you wish to defragment, and Power Defragmenter will internally use Contig to perform the defragmentation process. You may use Contig on machines running Windows XP, Vista and Windows 7.

For instance, if I were to defragment all the documents on my disk and none of the other files, the command* will be:

Contig.exe -v -s c:\Users\labnol\Documents\*.*

PS:You’ll need to run the utility as an administrator as it will throw an “Access denied” error.

And here’s a detailed output of a standard Contig command that tells you exactly what happens behind the scenes per file.

defragmentation process

Unlike other third-party defragmentation tools, Contig uses Windows’ internal defragmentation APIs so it won’t cause disk corruption, even if you terminate the program while its running.

Please note, however, that defragmentation is only recommended for traditional hard drives; computers using newer flash memory based solid-state drives should not use traditional defragmenters.  Even though file fragmentation may occur on these drives, it should not impact performance due to the nature of flash memory.  Additionally, defragmentation may actually decrease the life of a solid-state drive; however, they cannot cause this on a traditional platter-based hard drive.

Related: How to Reinstall Windows Without Losing Data

📮  Subscribe to our Email Newsletter for Google tips and tutorials!
Published in: command line - Downloads - freeware - utilities - Windows

Looking for something? Find here!

Meet the Author

Web Geek, Google Developer Expert
Amit Agarwal

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India. He is the developer of Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

Get in touch

Google Add-ons

Do more with your Gmail and GSuite account

We build bespoke solutions that use the capabilities and the features of Google Workspace for automating business processes and driving work productivity.

  1. Mail Merge with Attachments
    Send personalized email to your Google Contact with a Google Sheet and Gmail
  2. Save Emails and Attachments
    Download email messages and file attachments from Gmail to your Google Drive
  3. Google Forms Email Notifications
    Send email notifications to multiple people when a new Google Form is submitted
  4. Document Studio
    Create beautiful pixel perfect documents merging data from Google Sheets and Google Forms
  5. Creator Studio for Google Slides
    Turn your Google Slides presentations into animated GIFs and videos for uploading to YouTube