Home

Created By Wesley Griffin

 
 
 Find Files in Directories and Child Directories Using Search Pattern.
 
  Home > Source CodeFiles and Directories > Find Files
 
  The following zip file contains a class module called clsFindFile written in VB6.  To use the class you must set two properties. First, the path property, second the pattern property.  The path folder is the folder which the class begins searching in, it also searches every sub folder.  The pattern property can be a wildcard search pattern such as: '*.exe' for all files with the extension .exe, or 'a*.*' for all files beginning with the letter a.  After defining the two properties you use the function FindFiles.  Once the function has began it will raise an event every time a file is found.  After the search a few more resulting properties are created such as total files found and total directories.
   
  Please download the example zip file which contains the class module and an example, see screen shot below:
   
 

   
  Visual Basic 6 Example
 
 

 Top.

 
  Warning:
All material from this site must be used at own risk.  VB First Aid will take no responsibility for any loss of data or any other errors.  The material on this site was written for Visual Basic Version 6, therefore compatibility with other versions may cause errors.