FL File List Utility Version 1.0 Gene Pizzetta January 16, 1992 A ZCPR3 utility to create file lists on disk for use by other programs. Multiple ambiguous file specifications, including a negative specification, may be given. The error flag is set if no matching files are found. Matching filenames are written to a disk file, one name per line in standard command line format ("filename.typ"). Optionally, the DU in which the file is located can be included with the filename. USAGE: FL {{dir:}{afn} {...}} {~afn} {/options} If no DU or DIR is given, the currently logged directory is assumed. If no filename is given, all files ("*.*") are assumed. Files matching the negative filespec (preceded by a tilde) are excluded. The DIR or DU for the first filespec is assumed for all the remaining filespecs; directory specs after the first are ignored. The negative filespec must be immediately preceded by a tilde. If it is the only filespec given, all files not matching it are included in the file list. In that case the negative filespec may include a DU or DIR, e.g., FL ~A1:*.Z80 will list all files in A1 that don't have a filetype of "Z80". File output is the default. Any existing FILELIST file is erased without warning. The file listing is one filename per line in upper-case without DU specs. The FILELIST file is written to the "target" directory (the directory of the files in the file list) by default, but FL can be configured to write the file to the currently logged directory, if you prefer. In addition, the name of the list file can be changed. FL can be aborted at any time with ^C. If file output is in progress, the file will be properly closed, but it will not be erased. Screen lines and columns are obtained from the environment, so wide and long displays are available. OPTIONS: A slash is always required before the option list. O Omit disk output of matching filenames to the file FILELIST. This can be useful to see what files your command line will match before actually writing the list file. D Include DU specs with filenames in FILELIST. Normally only the filenames are included in the list file, but this option causes each filename to be prefixed by its DU spec. S Include system (hidden) files. As should any program accepting ambiguous filenames, FL normally ignores system files. With option S they are included. P Do not page screen display. By default FL waits for a keypress after each screenful of filenames. With the P option the display can only be paused with ^S. Q Quiet mode. Console output is suppressed, but file output is not affected. ERROR FLAG: FL sets the program error flag to 255 (0FFh) if no files are found which match the file masks given on the command line. This feature will allow batch operations to take corrective action if the list file is empty. Be sure your routine checks for 255, however, because the error flag can be set for other reasons. The error flag is set as follows: 2 = invalid directory given 4 = user aborted (optional) 11 = disk or directory full 12 = out of memory 19 = invalid option given 255 = no matching files For all errors except 255 the error handler is invoked, if one is installed in your system. CONFIGURATION: All command line options can be made default modes by using ZCNFG and the accompanying FLxx.CFG file. In that case the command line option will toggle the option to the non- default mode. In addition, FL can be configured to show filenames in upper- case, if you prefer. Whether the FILELIST output file is written to the currently logged directory or to the target directory can also be configured, along with the name of the list file if you prefer something besides FILELIST. In addiion, FL can be configured to set the error flag and invoke the error handler when it is aborted by a ^C from he user. This will allow the user to also abort a ZEX or SUB batch operation. It is best not to change the name of the configuration file. Its special name assures that ZCNFG will always find the correct CFG file, even if the name of FL has been changed or if more than one version of FL is online. HISTORY: Version 1.0 -- January 16, 1992 -- Gene Pizzetta Basic code from CPD 1.4, which made the job a lot easier. Multiple ambiguous filespecs allowed, but only one negative filespec. That shouldn't be too difficult to expand on in future enhancements. Also might be nice to be able to select files by attributes or combinations of attributes. Please report bugs and make suggestions to: Gene Pizzetta 481 Revere St. Revere, MA 02151 Voice: (617) 284-0891 Newton Centre Z-Node: (617) 965-7259 Ladera Z-Node Central: (213) 670-9465