DirPRN by JJO PURPOSE DirPRN may be invoked from the DOS prompt or from within a batch file (see below) to secure disk or directory files listings, sort them (optional) and print them (always). If no printer options are selected, DirPRN defaults to Epson and should be compatible with most printers. USAGE Syntax: DIRPRN [?][pathspec] [options] Parameters: [] optional and <> required, where a parameter is a character or a string (no spaces). Parameter sets must be separated by one or more spaces where so shown above. Parameter List ? means display this file (/? is also acceptable). Pathspec is the disk or directory to search; e. g: a:\ or c:\DOS. If pathspec is omitted, the current directory is used. Options, one or more of (any order and case); /B forces black & white display. /C centers header and date. /D inserts date. /H:c sets header style (c = (S)tandard, (H)igh or (W)ide). /L:n sets line spacing (n = 6, 4 or 8 lpi). /M:n sets margin (n = 0..10). /N insert page numbers. /P:n chooses printer port (n = 1..2). /Q:c sets print quality (c = (D)raft, (E)mphasized or (L)etter). /S:c sort criteria (c = (N)ame, (E)xtension, (D)ate or (S)ize). /S:pc p is optional prefix for c (p = (A)ll directory entries) where default (no prefix) is files, only. /T:c sets text style (c = (P)ica, (E)lite or (C)ompressed). /U:c selects printer (c = (E)pson, (D)ataproducts or (I)BM). The defaults are listed first. If H, L, Q or T are specified for other than an Epson (or clone), then enter a printer code. NOTES If there are command line errors or the specified printer is unavailable, DirPRN halts with an error message. Error messages are beeped and left on the screen when DirPRN terminates. If a header style is specified, it only affects printing of the directory name (header). If centering is specified, only the header and date are centered. This file may be printed via MerPRN or by typing at the DOS prompt TYPE DIRPRN.TXT > PRN. BATCH FILE USAGE DirPRN is designed for execution from within a batch file. When so used, test for an error code returned by DirPRN and, if found, stop batch execution until the problem is cleared. This can be done by inserting a line like this after each call to DirPRN: IF ERRORLEVEL 1 GOTO Error where "Error" can be any line(s) which cause the batch process to terminate. See the sample batch file DirEx.Bat. ***