LOTUSSCRIPT LANGUAGE
Returns file or directory names from a specified directory, or returns a drive volume label.
Syntax
Dir[$] [ ( fileSpec [ , attributeMask ] ) ]
Elements
fileSpec
Standard wildcard characters can be used in fileSpec to designate all files satisfying the wildcard criterion. Asterisk ( * ) for either the file name or the extension designates all files with any characters in that position. Question mark ( ? ) in any character position in either part of the name designates any single character in that position.
Dir$ always returns the names of normal files. To include other files in the returned list of file names, specify the sum of those values in the following table that correspond to the desired kinds of files:
Dir returns a Variant of DataType 8 (String), and Dir$ returns a String.
Note On any platform except Windows (16, 9x, NT, 2000) if you ask for just the volume label you will get an empty string.
Usage
The constants in the table are defined in the file lsconst.lss. Including this file in your script allows you to use constant names instead of their numeric values.
To determine whether a particular file exists, use an exact file name for the file_spec argument to Dir or Dir$. The return value is either the file name or, if the file does not exist, the empty string ("").
The first call to Dir or Dir$ returns the name of the first file in the specified directory that fits the file name specifications in the fileSpec argument. Then:
The Dir or Dir$ function may not be called recursively.
Example See Also