Programming Reference Manual
 
Syntax
 
Dir[$]([Pattern$][, AttribMask])
 
Description
Scan a directory for the first file matching Pattern$.
 
Parameter
Description
Pattern$
This string value is the path and name of the file search pattern. If this is omitted then continue scanning with the previous pattern. Each macro has its own independent search. A path relative to the current directory can be used.
AttribMask
This numeric value controls which files are found. A file with an attribute that matches will be found.
See Also
Example
 
Sub Main
    F$ = Dir$("*.*")
    While F$ <> ""
        Debug.Print F$
        F$ = Dir$()
    Wend
End Sub