Dir()

  • Thread starter Thread starter A. J.
  • Start date Start date
A

A. J.

Could someone help me for the meaning of "*.*", 31 in the code below?
FileName = Dir(FolderName + "*.*", 31)

Thanks!
 
Hi A. J.,
the meaning of "*.*" is every file in foldername. Otherwise if you want
only, for example, txt files you have to write "*.txt".
the 31 specify the attributes of the files you wanna be returned. The number
that you specify is the sum of the following constant(from the access help)
each one representing a kind of file's attribute

vbNormal 0 (Default) Specifies files with no attributes.
vbReadOnly 1 Specifies read-only files in addition to files with no
attributes.
vbHidden 2 Specifies hidden files in addition to files with no attributes.
VbSystem 4 Specifies system files in addition to files with no attributes.
Not available on the Macintosh.
vbVolume 8 Specifies volume label; if any other attributed is specified,
vbVolume is ignored. Not available on the Macintosh.
vbDirectory 16 Specifies directories or folders in addition to files with no
attributes.
vbAlias 64 Specified file name is an alias. Available only on the Macintosh.

HTH Paolo
 
Thanks!


Paolo said:
Hi A. J.,
the meaning of "*.*" is every file in foldername. Otherwise if you want
only, for example, txt files you have to write "*.txt".
the 31 specify the attributes of the files you wanna be returned. The number
that you specify is the sum of the following constant(from the access help)
each one representing a kind of file's attribute

vbNormal 0 (Default) Specifies files with no attributes.
vbReadOnly 1 Specifies read-only files in addition to files with no
attributes.
vbHidden 2 Specifies hidden files in addition to files with no attributes.
VbSystem 4 Specifies system files in addition to files with no attributes.
Not available on the Macintosh.
vbVolume 8 Specifies volume label; if any other attributed is specified,
vbVolume is ignored. Not available on the Macintosh.
vbDirectory 16 Specifies directories or folders in addition to files with no
attributes.
vbAlias 64 Specified file name is an alias. Available only on the Macintosh.

HTH Paolo
 
Back
Top