Hi,
I want to list diferente kind of files in a directory, for example *.txt,*.zip,... But I want to know if I can do it just once, instead of call the DIR function for each extension
Do While (Len(lStr_CheckFile) > 0)
lStr_CheckFile = UCase(lStr_CheckFile)
If (lStr_CheckFile <> "PAGEFILE.SYS" Then
If (Left(lStr_CheckFile, 1) <> "." Then
lInt_FileType = GetAttr(<Your Direcotry> & lStr_CheckFile) And vbDirectory
If (Int_FileType <> vbDirectory) Then
Select Case Right(lStr_CheckFile, 4)
Case ".ZIP"
<Handle Zip File>
Case ".TXT"
<Handle Text File>
...
End Select
End If
End If
End If
lStr_CheckFile = Dir
Loop
Good Luck
-------------- As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.