Returns a list of filenames from a directory and mask specified in a previous InitDir statement. The mask is used to create a selection of file names, using the standard DOS wildcards "*" and "?".
filenames = DirList()
The DirList function returns a dynamic array of the operating system filenames found in the directory masked by the InitDir statement.
With each use of DirList(), a list of filenames will be returned from the specified directory. DirList() may be placed in a loop to obtain all the filenames in a large directory. The loop would continue until the list is empty. Filenames are separated by field marks (ASCII character 254).