Article ID: 104685
Article Last Modified on 10/28/2003
Const ATTR_NORMAL = 0 Const ATTR_READONLY = 1 Const ATTR_HIDDEN = 2 Const ATTR_SYSTEM = 4 Const ATTR_VOLUME = 8 Const ATTR_DIRECTORY = 16 Const ATTR_ARCHIVE = 32
Sub Command1_Click ()
Dim filename As String
Dim attr As Integer
' retrieve hidden and normal files
filename = Dir$("c:\", ATTR_HIDDEN)
Do Until filename = ""
attr = GetAttr("c:\" & filename)
' if the file has the hidden attribute
If (attr And ATTR_HIDDEN) Then
' select it
List1.AddItem filename
End If
filename = Dir$
Loop
End Sub
Additional query words: 2.00 3.00 Dir Dir$ GetAttr docerr
Keywords: KB104685