NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

HxLink DID NOT INITIALIZE

Dir Function

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.

Dir (pathname[, fileattributes])

Arguments

pathname
Optional. String expression that specifies a file name — may include directory or folder, and drive. A zero-length string ("") is returned if pathname is not found.
attributes
Optional. Constant or numeric expression, whose sum specifies file attributes. If omitted, returns files that match pathname, but have no attributes.

Settings

The attributes argument settings are:

Constant Value Description
Normal 0 (Default) Specifies files with no attributes.
ReadOnly 1 Specifies read-only files in addition to files with no attributes.
Hidden 2 Specifies hidden files in addition to files with no attributes.
System 4 Specifies system files in addition to files with no attributes.
Volume 8 Specifies volume label if any other attributed is specified; vbVolume is ignored.
Directory 16 Specifies directories or folders in addition to files with no attributes.

Note   These constants are specified by Visual Basic for Applications and can be used anywhere in your code in place of the actual values.

Remarks

Dir supports the use of multiple character (*) and single character (?) wildcards to specify multiple files.

See Also

Example

ChDir Statement | CurDir Function | MacID Function | Returning Strings from Functions