home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / UTILS / DIRUTL / NINDEX.DQC / NINDEX.DOC
Text File  |  2000-06-30  |  11KB  |  219 lines

  1.                                 INDEX PROGRAM
  2.                                  Version 3.0
  3.  
  4.                                       by
  5.                                  F. J. Greeb
  6.                                1915 S. Cape Way
  7.                            Denver, Colorado  80227
  8.                               Copyright (C) 1981
  9.  
  10.      INDEX is a CP/M (R) utility program combining the features of DIR and
  11. STAT.  It provides an alphabetical listing of the disk directory, spaced in
  12. columns across the screen, and may include the file size for each entry.  The
  13. total number of files, the total number of directory entries used, the disk
  14. space used, and the disk space remaining is also reported.
  15.  
  16.      The general form of the command is
  17.  
  18.             INDEX {/OPTIONS} {DRIVE:}{FILENAME}{.}{FILETYPE}
  19.  
  20. where all of the parameters in the braces are optional.  Wild card characters
  21. (* and ?) can be included in the file name designations.  The following
  22. example commands, and their results, illustrate the wild character capability
  23. of the program.
  24.  
  25.  
  26.           INDEX                 Directory of all files on current drive
  27.           INDEX B:              Directory of all files on drive B
  28.           INDEX *.COM           Directory of all COM files on drive B
  29.           INDEX A??.*           Directory of all three letter or less
  30.                                 file names begining with the letter A
  31.                                 on the current drive
  32.           INDEX B:A*.*          Directory of all files on drive B which
  33.                                 begin with the letter A, regardless of
  34.                                 the file name length.
  35.  
  36.      OPTIONS - The options which are allowed are:
  37.  
  38.           /R          Resets the disk system before performing the
  39.                       directory search.  Use this option if you
  40.                       change disks without doing a Control C.
  41.  
  42.           /P          Directs the output to the printer rather than
  43.                       to the console.
  44.  
  45.           /F          Outputs a form feed character (Control L) before
  46.                       printing the directory (console or printer).
  47.  
  48.           /T          Allows a title to be input (immediately following
  49.                       the T) which will replace the DRIVE designator on
  50.                       the directory output.  The maximum title length is
  51.                       20 characters, and no spaces may be contained in
  52.                       the input title.  To include spaces in the output
  53.                       title, use the underline character.  The underline
  54.                       will be translated to a space before the title is
  55.                       printed.  If you are using the Master Catalog Program
  56.                       and your disks have a disk name file with a dash as
  57.                       the first character, the disk name may be used as the
  58.                       title by using a /T- option.  This form of the title
  59.                       option causes the INDEX program to read the disk name
  60.                       and substitute it for the normal title.
  61.  
  62.           /B          Sets the brief mode.  The size reporting for each
  63.                       individual file is suppressed.  The total disk space
  64.                       used is still reported.  This mode is useful for
  65.                       large directories, since more columns will fit on
  66.                       the screen.
  67.  
  68.           /Wn         Set the output width to n, where n is a number in the
  69.                       range of 32 to 255.  This command can be used to
  70.                       adjust the program for screens smaller than the
  71.                       nominal value of 80, or to set the width to a
  72.                       larger number for directories sent to the printer.
  73.                       The number of columns is automatically adjusted to
  74.                       fit the width you specify.
  75.  
  76.           /S          Include system files in the directory listing
  77.                       (CP/M Version 2 only).  System files are
  78.                       normally suppressed from the directory.  This
  79.                       option allows you to display them.
  80.  
  81.           /M          Modify the program to reset any of the above
  82.                       options to the default value.  For example,
  83.                       INDEX /B/M will modify the program so that the
  84.                       brief mode is the normal state.  Including the
  85.                       /B command will then cause the expanded output
  86.                       form to be used.  /T-/M will cause the title to
  87.                       default to the disk name.  If no disk name is
  88.                       found, the normal DRIVE A title will be used.
  89.                       You can not set up any other title as the
  90.                       default value.  See the note below concerning
  91.                       this option.
  92.  
  93.            /V         Reports the version number for the INDEX program
  94.                       you are using.  Please include this version number
  95.                       when reporting any bugs or suggested improvements
  96.                       to the program.
  97.  
  98.            /Un        Lists the directory for user number n, where n
  99.                       is a number in the range of 0 to 15
  100.                       (CP/M Version 2 only).
  101.  
  102.            /H         Print a short help message on the console, which
  103.                       lists all of the available options.
  104.  
  105.  
  106.      The options may be chained together by separating then with a slash,
  107. which is used as the option designator character.  Chained options may appear
  108. in any sequence and may also include a space as a separator if desired.  There
  109. must be at least one space following the last option and any drive or file
  110. designator which is included.
  111.  
  112.      For example, the command
  113.  
  114.           INDEX /R/P /F/TSYSTEM_FILES B:*.COM
  115.  
  116. will reset the disk system, use a title of SYSTEM FILES, and output the
  117. directory of all COM files on drive B to the printer, with a leading form
  118. feed.  A little experimentation with the options and file name wild card
  119. characters will give a better understanding of their operation.  Note that all
  120. inputs may be in either lower or upper case, and are translated internally to
  121. upper case only, in keeping with the CP/M format.  This does not include the
  122. titles, which may be output in upper or lower case.
  123.  
  124.  
  125.                                 Error Messages
  126.  
  127.      There are three error messages which may be output by the program.  These
  128. are:
  129.  
  130.           INVALID FILE NAME  - Indicates that the file name specified is not a
  131. valid CP/M file name.  This usually means that it is too long, although other
  132. problems can cause this error message to appear.
  133.  
  134.           UNRECOGNIZED OPTION IGNORED - Indicates that an option has been
  135. included in the command string that the program does not recognize.  The error
  136. is ignored and all other options are still in effect.
  137.  
  138.           FILE ERROR DURING MODIFY - Indicates that the modify option was not
  139. completed successfully.  This can occur if the file INDEX.COM is not found on
  140. the default disk, if the program and disk version numbers do not match, or if
  141. a disk write error occurs.
  142.  
  143.  
  144.                                 Modify Option
  145.  
  146.      A word of caution if you use the Modify option.  This option requires
  147. that the INDEX.COM program is on the default disk.  If you are logged on to
  148. Drive A, and you issue the command B:INDEX /B/M to set the default to the
  149. brief mode, the program will search for a program named INDEX.COM on Drive A.
  150. If you do not have a second copy of the program on Drive A, an error will be
  151. reported and no serious consequences will result.  However, if there is a file
  152. named INDEX.COM on Drive A, and it is not the same as the program on Drive B,
  153. or is a completely different program, it is possible that it will be
  154. destroyed.  The modify command performs a check for the correct version number
  155. and a partial contents comparison before allowing the modify operation to be
  156. completed, but this is not completely foolproof.  The modify command asks for
  157. confirmation before updating the program so if you input the modify option by
  158. mistake you can abort it before any harm is done.
  159.  
  160.      The modify command can be used to set up a default value for performance
  161. of a series of runs, and then be used again to restore the program to its
  162. original state.  For example, if you want to list a series of directories on
  163. the printer, with a leading form feed for each printout, the command
  164.  
  165.           INDEX /P/F/R/M
  166.  
  167. can be used to set up the desired default mode.  You can then list all of the
  168. disks, assuming you are logged on to Drive A, using the command
  169.  
  170.           INDEX B:
  171.  
  172. The new default values eliminate the need to list the options separately for
  173. each disk that you put in the B drive.  Including the reset option allows the
  174. disk space remaining to be reported correctly, without having to input a
  175. Control C after each disk change.
  176.  
  177.      After you have printed all of the desired directories, the program output
  178. can be restored to the console by using the command
  179.  
  180.           INDEX /P/M
  181.  
  182. The /P option toggles the printer flag, and since the current default was for
  183. printer output, this returns the default to the console.  Also, since the /F
  184. and /R options were not reset, they are still in effect as the default mode.
  185. Using this technique, you can set up any available options that you desire as
  186. the default mode.  Note that only options preceeding the /M option in the
  187. command line will be modified.  A command of the form
  188.  
  189.           INDEX /B/M/P
  190.  
  191. will send a brief mode directory to the printer, but only the brief mode will
  192. be reset as the default value.  Since the /P option is after the /M option,
  193. the printer will be used for this run only, rather than becoming the default
  194. mode.
  195.  
  196.  
  197.                             Operating Restrictions
  198.  
  199.      The program is configured in a general manner and should work with any
  200. version of CP/M, with mini-disks, 8 inch disks, or even hard disks.  The
  201. program has been tested with CP/M Version 1.4 and 2.2 using both single and
  202. double density 8 inch disks, and with Version 2.2 using mini disks and hard
  203. disks.  Please report any errors or bugs which are detected to the author at
  204. the address listed above, including the INDEX version number as reported by
  205. the /V option, and as much detail about the system configuration and disk
  206. status as possible.
  207.  
  208.      There is one known case where file sizes may not be reported correctly.
  209. If you use the random write capability of CP/M Version 2, and write a file
  210. with holes (such as initially writing only record 10 and record 2356), the
  211. file size reported may not be correct.  Since this type of file occurs only
  212. rarely (most random files are initially created sequentially) the extra code
  213. necessary to assure correct size reporting for them has not been included in
  214. the program.  If you have a file of this type, the CP/M STAT command can be
  215. used to verify the file size.
  216.  
  217.  
  218. CP/M is a registered trademark of Digital Research.
  219.