6.1.2.5.1.2 Dir
Function Declaration
-
Function Dir(Optional PathName As Variant, Optional Attributes As VbFileAttribute = vbNormal )As String
Parameter |
Description |
---|---|
PathName |
Any data value (section 2.1) that specifies a file name. It can include directory or folder, and drive. The data value SHOULD be Let-coercible to String. A zero-length string ("") is returned if PathName is not found. |
Attributes |
Constant or numeric expression, whose sum specifies file attributes. If omitted, returns files that match PathName but have no attributes. |
Runtime Semantics.
§ Returns a String data value representing the name of a file, directory, or folder that matches a specified pattern or file attribute, or the volume label of a drive.
§ The attributes argument can be the logical or any combination of the values of the vbFileAttribute enumeration.
§ Dir supports the use of multiple character (*) and single character (?) wildcards to specify multiple files.