◄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.