I want to do a directory listing of multiple patterns at once... possible?
In vb you would normally ask in a file requester for "*.mpg|*.avi|*.mov" if I remember correctly. Is this possible in pb or do I need to roll my own handler for that?
ExamineDirectory question
I don't think you can with pure PB. I have never managed this (but that is no reason to believe it cannot be done!).
Anyhow I use variations on the following:
If that helps. Perhaps (hopefully) someone has a better way?
Anyhow I use variations on the following:
Code: Select all
If ExamineDirectory(0, "Q:\DOWNLOADS", "")
Repeat
FileType = NextDirectoryEntry()
If FileType
FileName$ = DirectoryEntryName()
If FileType = 2 ; Directory type
Debug "<DIR> "+FileName$
ElseIf FileType = 1
w.s=LCase(FileName$)
If Right(w,4)=".exe"
Debug FileName$
ElseIf Right(w,4)=".zip"
Debug FileName$
ElseIf Right(w,11)=".pb.declare"
Debug FileName$
EndIf
EndIf
EndIf
Until FileType = 0
Else
Debug "DARN!"
EndIf
@}--`--,-- A rose by any other name ..