How to defragment a single file and not the entire disk

Contributor Icon Contributed by shamanstears Date Icon August 18, 2006  
Tag Icon Tagged: Windows networking

Sysinternals provides the Contig utility, which you can use to defragment individual files or folders.


You can download the tool at

http://www.sysinternals.com/Utilities/Contig.html

To defragment a single file, use this format:

contig [filename]

To analyze the fragmentation status, add the -a switch, for example:

X: emp>contig -a en_whatchmacallit.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 Contig tool is a great utility to keep important files defragmented without having to worry about the entire disk.

Previous recipe | Next recipe |
 

 
close Reblog this comment
blog comments powered by Disqus