home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Supreme Volume 6 #1
/
swsii.zip
/
swsii
/
165
/
CHKFRG14.ZIP
/
CHKFRAG.DOC
< prev
next >
Wrap
Text File
|
1991-12-16
|
4KB
|
67 lines
CHKFRAG
Bob Flanders and Michael Holmes August, 1989 (Utilities)
Current version: 1.4 - December 16, 1991
Purpose: To report, on-screen, the extent of file fragmentation on a hard
disk, and provide an ERRORLEVEL value usable within a batch file
to call a defragmenting program.
Format: CHKFRAG [d:] [/% | /N | /E | /F] [/L] [/4]
Remarks: Executed without any of its optional parameters, CHKFRAG
produces a screen report indicating the number of files and
directories, how many and what percentage of these are
fragmented, and how many extra (non- contiguously stored) parts
of files are contained on the currently-logged drive. An
ERRORLEVEL code from 0-100, reflecting the percentage of
fragmented files, (the /% parameter is the default) is also
shown.
An alternative drive (d:) to be analyzed may be specified, as
may be ERRORLEVEL return codes that reflect the actual number of
fragmented files (the /N parameter), the number of contiguous
free areas on the disk or of extra sections (the /E parameter).
The ERRORLEVEL return codes are not intended for strict
accuracy: if any file is fragmented the minimum ERRORLEVEL
returned by the /% parameter is 1%, and 254 is the maximum
ERRORLEVEL returned by the /N and /E switch options. These
return codes are intended to be used to trigger automatic
loading and execution of the user's defragmenting utility from
within a batch file. An ERRORLEVEL return code of 255 is used
to indicate an error condition, which halts operation.
If desired, a list of the names of fragmented files and
directories can be produced by specifying the optional /L
parameter. The normal screen output from CHKFRAG may be
redirected to a file or to a printer, for easier analysis.
If you are using DOS 3.31 (or any version of DOS before 4.x that
used 32 bit sector numbers for large hard disks), the /4
parameter will cause CHKFRAG to use a the DOS 4.x interface for
large drives.
The DOS CHKDSK command, specified with its /F switch, should be
executed before running CHKFRAG; lost clusters or cross-linked
files are interpreted by CHKFRAG as a error condition. Drives
created with the DOS ASSIGN or SUBST commands, and directories
created by JOIN, are not checked by CHKFRAG. While analyzing
large disks, the utility requires approximately 100KB of
available RAM. On-screen recommendations are to consider using
a defragmenting utility when file fragmentation is in the range
from 11% to 75%, and definitely to defragment disks that show
more than 75% fragmentation.
CHKFRAG.EXE was written in the C language and its source code
should be compiled using the Microsoft C Compiler, Version 5.1
or later.
Compile as follows:
CL /AL CHKFRAG.C
Notes: If CHKFRAG is used within a batch job, the "/%" parameter must
be specified as "/%%". This is necessarcy because the DOS batch
interpreter uses the percent (%) character to indicate where
replaceable parameters are to be inserted in the command line.