bas7advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
DIR$ Function Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
DIR$ returns a filename that matches the specified pattern.
 
DIR$[(filespec$)]
    ■ BASIC generates the error message, "Illegal Function Call" if you
      don't specify a filespec$ when you first call DIR$.
 
Usage Notes
    ■ DIR$ returns the first filename that matches the filespec$ you
      specify. To retrieve additional filenames that match the filespec$
      pattern, call DIR$ again with no argument. When no filenames match,
      DIR$ returns a null string.
    ■ You do not have to retrieve all the filenames that match a given
      filespec$ before calling DIR$ again with a new filespec$.
    ■ DIR$ is not case sensitive. "C" is the same as "c."
 
Programming Tips
    ■ Because filenames are retrieved in no particular order, you may want
      to store filenames in a dynamic array and sort the array.