DIRECTORY procedure
Prints or saves a list of files with names matching a specified mask (D.B. Baird).
Option
Parameters
Description
DIRECTORY obtains a list of files matching a specified template. The list can
be saved in the text supplied by the FILENAMES parameter. By default the list
of files is printed, but you can set option PRINT=* to suppress this.
The template is specified in a text with a single value using the MASK
parameter. It uses the standard conventions of the DOS DIR command but,
for convenience, you can put / instead of \, as in other GenStat file
specifications. So, for example, you can list the files with a suffix .GEN
in the folder (or directory) c:\genprog by putting either
DIRECTORY 'c:\\genprog\\*.gen'
or
DIRECTORY 'c:/genprog/*.gen'
(The doubling of each symbol \ within the string is required as usual to
tell GenStat that it should not be treated as the continuation symbol.) Note,
however, that the names that are saved or printed do not include the directory
path. If no directory is specified in the template (e.g. MASK='*.gen'), the
current working directory is searched.
Option: PRINT.
Parameters: MASK, FILENAMES.
Method
The file list is obtained by a call to SUSPEND with a DIR command.