A Better Disk Defragmenter Utility from Microsoft

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

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

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.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

0

Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.