How can I defragment a single file and not the entire disk?

John Savill

July 23, 2006

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. Sysinternals provides the Contig utility, which you can use to defragment individual files or folders. You can download the tool here. To defragment a single file, use this format:

contig 

To analyze the fragmentation status, add the -a switch, as this example shows:

D:temp>contig -a en_system_center_capacity_planner_2006.iso

Alternatively, you can use wild cards in addition to the -s switch to search through the path given and any child folders and perform degragmentation on files matching the given file name criteria. The Config tool is a great utility to keep important files defragmented without having to worry about the entire disk.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like