V.2.9
clsSearchFiles

A very powerful class used to search files; supports asynchronous mode and recursion on subdirectory.
Returns a collection of
clsSearchFilesFInfo class that you can use to get a lot of file information. Supports UNICODE and UNC paths.

Methods:
CurrentDir Returns the current directory when searching (in Async mode)
IsSearching Returns true if the searching process is running (in Async mode)
SearchFilePatternPathNoPattern Searches in the given path (with pattern) for files/dirs; the recursion is made on every subfolder (without pattern)
SearchInPath Searches in the given path for files/dirs
SearchPathPattern Searches in the given path (with pattern) for files/dirs
StopSearch Stops the search (in Async mode)
How to use the class:
1- Create an instance of the class and an empty collection

    Dim osf as clsSearchFiles
    Set osf=new clsSearchFiles
    Dim oc as Collection

2- Assign the collection to the class

    Set oc=osf.SearchInPath ()

3- Browse results

    Dim osfi as clsSearchFilesFInfo
    For i=1 to oc.Count
        Set osfi=oc.Item(i)
        'Use the osfi class here ;-)
    Next

Notes:
If you use the "bRecurseSubDirs" = True and "bHierarchicalCollection" = True a 
HierarchicalCollection will be returned so for every folder you'll find its files into the 
osfi.oCollSubFiles collection so you need a recursive function to explore the tree. Very 
useful for creating a treeview with files and folders.
http://www.hexagora.com
Thu, 4 Dec 2008 09:47:07 UT
Copyright 2003-10 by Lorenzi Davide