
Use the MacID function to specify file type instead of using the file names. In Microsoft Windows and macOS, Dir supports the use of multiple character ( *) and single character ( ?) wildcards to specify multiple files.īecause the Macintosh doesn't support the wildcards, use the file type to identify groups of files.

These constants are specified by Visual Basic for Applications and can be used anywhere in your code in place of the actual values. Specifies directories or folders in addition to files with no attributes. Specifies volume label if any other attribute is specified, vbVolume is ignored. Specifies system files in addition to files with no attributes. Specifies hidden files in addition to files with no attributes.

Specifies read-only files in addition to files with no attributes. (Default) Specifies files with no attributes. The attributes argument settings are: Constant If omitted, returns files that match pathname but have no attributes. Constant or numeric expression, whose sum specifies file attributes. A zero-length string ("") is returned if pathname is not found. String expression that specifies a file name may include directory or folder, and drive. The Dir function syntax has these parts: Part

Returns a String representing the name of a file, directory, or folder that matches a specified pattern or file attribute, or the volume label of a drive.
