Forum Discussion

Michael_St_Pete's avatar
Michael_St_Pete
Contributor
14 years ago

Searching for a group of files

How can I do a search for a group of files?  I have tried using the following:

aqFileSystem.Exists(LSS_Data_Dir + DataSetName + ".*")



But that did not work.  I could search for each type of file but the extensions may change.  How can I do this if I do not know what the extension is?



Mike

1 Reply

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Michael,



    Use aqFileSystem.FindFiles() (see "aqFileSystem.FindFiles" help topic for more details) to enumerate the files matching your pattern and then iterate through the returned list to check if the needed file was found. (The referenced help topic contains an exemple of how to do this.)