Contig | |
Author: | Mark Russinovich |
Developer: | Sysinternals (a Microsoft subsidiary) |
Latest Release Version: | 1.8 |
Operating System: | Windows |
Genre: | Defragmentation |
License: | Proprietary freeware |
Website: | Microsoft Technet |
Contig is a command line defragmentation utility for Windows developed by Microsoft as part of the Sysinternals Suite.
Contig is designed to defragment individual files,[1] or specified groups of files, and does not attempt to move files to the beginning of the partition. Unlike the Windows built-in defragmenter tool, Contig can defragment individual files, individual directories, and subsets of the file system using wildcards.
Contig does not move any data except that belonging to the file in the question, so the amount it can defragment a file is limited to the largest contiguous block of free space on a system. Use of contig exchanges decreased file fragmentation for increased free space fragmentation.
Combined usage of the -s parameter and the wildcard symbol * allows whole directories and drives to be defragmented: for example,
Directories, for example, can be defragmented with the following command. This will help speed up accessing files in a directory with many hundreds or thousands of files.[2]
Adding the -v parameter to the command runs contig in verbose mode.For instance:
When the filesystem is NTFS, contig can also analyse and defragment the following files:
For instance:A small change to the Windows registry allows entire folders to be defragmented from Windows Explorer. New unfragmented files with specified name and length can be created.
After downloading Contig(64), place the exe in root of C: first. Then create the *.reg file with the code below or manually add it to the registry.
Windows Registry Editor Version 5.00
<br />[HKEY_CLASSES_ROOT\Directory\shell\contig]<br />@="Defragment this folder with Contig"<br />[HKEY_CLASSES_ROOT\Directory\shell\contig\command]<br />@="cmd.exe /K c:\contig.exe (or c:\contig64.exe) \"%L\" -v -s"
Derivative programs that use Contig include Power Defragmenter GUI and Multiple Applicator 6.8. A related freeware product by the same author is PageDefrag.