Dec 122017
Check hard drive for fragmented files.
File CONTIG.ZIP from The Programmer’s Corner in
Category HD Utilities
Check hard drive for fragmented files.
File Name File Size Zip Size Zip Type
CONTIG.DOC 3603 1418 deflated
CONTIG.EXE 11204 6589 deflated
TPCREAD.ME 199 165 deflated

Download File CONTIG.ZIP Here

Contents of the CONTIG.DOC file


Contig is a utility designed to work with CHKDSK to produce
a report showing all the non-contiguous files in a directory
path. Contig uses CHKDSK but it also has the knowledge needed
to traverse a subdirectory structure on a hard(or floppy) disk.

Contig works by spawning CHKDSK in all encountered
subdirectories and piping its output to a disk file. The disk
file is then read and non-contiguous file are reported to STDOUT.
A grand total line is sent to STDOUT after the disk file is

Usage: CONTIG pathspec [-s] [-q] [-o] [-d] [-c]

Pathspec is the only required parameter. It tells Contig
where to start spawning CHKDSK and if it includes a
filespec(with or without wild card characters) that filename
will be passed directly to CHKDSK.

-s This switch causes Contig to process all lower
subdirectories. The default is to process only the
specified directory.

-q This causes Contig to suppress the listing of
directory names that it spawns CHKDSK in.

-o This switch is used in the form "-ofilespec" where
filespec is used as a output file name for CHKDSK,
i.e. CHKDSK will have its STDOUT pointed to this file.
The default name is "\CONTIG.TMP".

-d Instructs Contig to retain the CHKDSK output file, the
default action is to remove the file.

-c Causes Contig to write STDOUT characters to STDERR (in
addition to STDOUT). This allows you t see the report
as it is created as well as capture it to a disk file.

Now for a few examples. . .


This tells Contig to start at the root level on drive
C: and continue through all lower directories. Because
now file name is specified "????????.???" is assumed.


This tells Contig to start at root level of logged
drive and continue through all lower subdirectories.
The -C causes Contig's output to me duplicated on
STDERR, the redirection causes Contig's report to be
saved in "\CHKDSK.RPT".
This tells Contig to start at "C:\LC" and do ONLY that
directory. The -Q causes the processed subdirectory
list (in this case only "C:\LC") to be suppressed.
The -D prevents Contig from erasing the temporary
file used to hold CHKDSK's output.

Finally, as shipped, Contig spawns CHKDSK as a child of
COMMAND.COM. This will works as long as CHKDSK can be found in
the search PATH. Since many users have CHKDSK in a subdirectory,
like "\DOS\", Contig can, optionally, load CHKDSK.COM directly.
The latter method is much faster but less flexible. To force
Contig to load CHKDSK.COM directly just place a variable in
the DOS environment as shown below.


For example, if CHKDSK.COM is on drive C: in the path
"\DOS\" then the variable assignment would be something like


If the variable "CHKDSK" is NOT found in the environment
then Contig automatically spawns "COMMAND.COM", from the environment
variable "COMSPEC", and makes "CHKDSK" a child of "COMMAND".

 December 12, 2017  Add comments

Leave a Reply