Name

Dir Function — Microsoft.VisualBasic.FileSystem

Synopsis

Dir[(pathname[, attributes])]
pathname optional; String

A string expression that defines a path, which may contain a drive name, a folder name, and a filename

attributes optional; Numeric or Constant of the FileAttribute enumeration

The file attributes to be matched

Return Value

String

Description

Returns the name of a single file or folder matching the pattern and attribute passed to the function.

A zero-length string (“”) is returned if a matching file is not found.

Possible values for attributes are:

FileAttributeenumeration

Value

Description

Normal

0

Normal (not hidden and not a system file)

ReadOnly

1

Read-only file

Hidden

2

Hidden

System

4

System file

Volume

8

Volume label; if specified, all other attributes are ignored

Directory

16

Directory or folder

Archive

32

Archive

Alias

64

Alias or link

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset