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

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 <filename>

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.

TAGS: Windows 8
Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.