home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / HARDDISK / CHKFRG13.ZIP / CHKFRAG.DOC next >
Encoding:
Text File  |  1990-03-27  |  5.4 KB  |  120 lines

  1.  
  2. CHKFRAG Version 1.3 - March 27, 1990
  3. Modified by Bruce Bequette for Large Drive support.
  4. The original CHKFRAG 1.0 appeared in PC Magazine.
  5. Distributed through San Diego PCBoard (C)
  6. (619) 584-1715 (data)
  7.  
  8.  
  9.     format    CHKFRAG  [d:] [/% | /N | /E] [/L] [/10 | /100]
  10.  
  11.     where    d:   is the drive to check for fragmentation
  12.         /%   sets errorlevel as a percentage
  13.         /N   sets errorlevel to number of fragmented files (max 254)
  14.         /E   sets errorlevel number of extra sections (max 254)
  15.         /L   causes fragmented files to be listed
  16.         /10  divide return result by 10
  17.         /100 divides the return result by 100 before
  18.              setting DOS errorlevel.  These will allow you to
  19.              exceed the (max 254) limit on the /E and /N options.
  20.              They have no effect on the /% option.
  21.  
  22. This release merely adds the options /10 and /100 to scale the return
  23. errorlevel into something manageable by batch files.  This is in direct
  24. response to a request by a sysop.
  25.  
  26. =========================================================================
  27.  
  28. CHKFRAG Version 1.2
  29.  
  30. This was released on December 28, 1989 when it was discovered that I
  31. had messed up handling of the 12 bit FAT's.  It is corrected in this
  32. version.
  33.  
  34. ===========================================================================
  35.  
  36. CHKFRAG Version 1.1 - December 28, 1989
  37. Modified by Bruce Bequette for Large Drive support.
  38. The original CHKFRAG 1.0 appeared in PC Magazine.
  39. Distributed through San Diego PCBoard (C)
  40. (619) 584-1715 (data)
  41.  
  42.     format    CHKFRAG  [d:] [/% | /N | /E] [/L]
  43.  
  44.     where    d: is the drive to check for fragmentation
  45.         /% sets errorlevel as a percentage
  46.         /N sets errorlevel to number of fragmented files (max 254)
  47.         /E sets errorlevel number of extra sections (max 254)
  48.         /L causes fragmented files to be listed
  49.  
  50. This version of CHKFRAG has been modified to support large disk
  51. drive partitions and DOS 4.x structures.
  52.  
  53. When I originally ran CHKFRAG.EXE 1.0, it gave me an error reading
  54. the boot record on my disk.  It turns out that CHKFRAG 1.0 couldn't
  55. handle disks with a large partition.  So I compiled it to run under
  56. CodeView and found part of the problem.  There were numerous warning
  57. messages from the compiler, memory addressing problems, and in MicroSoft
  58. C verison 5.1, it handled structure declarations differently than
  59. previous version, and returned erroneous results unless you used the
  60. /Zp switch (support for packed structures).
  61.  
  62. I cleaned up all of the warning messages, properly declared all functions
  63. and typecast all variables that needed it.  In addition, I added support
  64. for large disk drives.  The code still requires the /Zp compiler switch,
  65. but that won't concern you because I have decided not to release the
  66. modified source code.
  67.  
  68. If you have problems with this program, please send a note to me on
  69. San Diego PCBoard at (619) 584-1715 (2400b).
  70.  
  71. ***************************************************************************
  72.     The original documentation follows.
  73. ***************************************************************************
  74.  
  75. CHKFRAG
  76. Command
  77.  
  78. Bob Flanders and Michael Holmes
  79. August, 1989 (Utilities)
  80.  
  81. Purpose:    To report, on-screen, the extent of file fragmentation on a hard
  82. disk, and provide an ERRORLEVEL value usable within a batch file to call a
  83. defragmenting program.  
  84.  
  85. Format:    CHKFRAG [d:] [/% | /N | /E] [/L]
  86.  
  87. Remarks:    Executed without any of its optional parameters, CHKFRAG
  88. produces a screen report indicating the number of files and directories, how
  89. many and what percentage of these are fragmented, and how many extra (non-
  90. contiguously stored) parts of files are contained on the currently-logged drive.
  91. An ERRORLEVEL code from 0-100, reflecting the percentage of fragmented files,
  92. (the /% parameter is the default) is also shown.
  93.  
  94.     An alternative drive (d:) to be analyzed may be specified, as may be
  95. ERRORLEVEL return codes that reflect the actual number of fragmented files (the
  96. /N parameter) or of extra sections (the /E parameter).  The ERRORLEVEL return
  97. codes are not intended for strict accuracy:  if any file is fragmented the
  98. minimum ERRORLEVEL returned by the /% parameter is 1%, and 254 is the maximum
  99. ERRORLEVEL returned by the /N and /E switch options.  These return codes are
  100. intended to be used to trigger automatic loading and execution of the user's
  101. defragmenting utility from within a batch file.  An ERRORLEVEL return code of
  102. 255 is used to indicate an error condition, which halts operation.
  103.  
  104.     If desired, a list of the names of fragmented files and directories can
  105. be produced by specifying the optional /L parameter.  The normal screen output
  106. from CHKFRAG may be redirected to a file or to a printer, for easier analysis.
  107.  
  108.     The DOS CHKDSK command, specified with its /F switch, should be executed
  109. before running CHKFRAG; lost clusters or cross-linked files are interpreted by
  110. CHKFRAG as a error condition.  Drives created with the DOS ASSIGN or SUBST
  111. commands, and directories created by JOIN, are not checked by CHKFRAG.  While
  112. analyzing large disks, the utility requires approximately 100KB of available
  113. RAM.  On-screen recommendations are to consider using a defragmenting utility
  114. when file fragmentation is in the range from 11% to 75%, and definitely to
  115. defragment disks that show more than 75% fragmentation. 
  116.  
  117.     CHKFRAG.EXE was written in the C language and its source code should be
  118. compiled using the Microsoft C Compiler, Version 5.0 or later. 
  119. «MDNM»
  120.