In order to save some bandwidth we are only showing the additions to issue #80. Just paste this code right before the FindFile routine in Issue #80. If you have any questions, email us at issue81help@codeoftheweek.com
'----------------------------------------------------------------------
'
' Module Name: cFindFiles
' Written By: Tracy Martin
' Modifications: C&D Programming Corp.
' Create Date: 2/99
' Copyright: Copyright 1999 by C&D Programming Corp. Source
' code may not be reproduced except for use in a
' compiled executable. All rights reserved. If
' you would like to reprint any or all of this
' code please email us at info@codeoftheweek.com
'----------------------------------------------------------------------
'
'
' PLEASE NOTE THAT YOU NEED THE SOURCE CODE FROM
' ISSUE #80 TO COMPLETE THIS CLASS!
'
'
'
'
'
Public Event FoundFile(fnd As cFindFiles)
Public Sub FindAllFiles(sDir As String, sFileMask As String)
Dim fnd As New cFindFiles
Dim bContinue As Boolean
' handle any kind of trailing character
If Right(sDir, 1) = "\" Then
bContinue = fnd.FindFile(sDir & sFileMask)
Else
bContinue = fnd.FindFile(sDir & "\" & sFileMask)
End If
While bContinue
If Not fnd.IsDots() Then
RaiseEvent FoundFile(fnd)
If fnd.IsDirectory Then
FindAllFiles fnd.GetFilePath, sFileMask
End If
End If
bContinue = fnd.FindNextFile
Wend
End Sub
Public Property Get IsDots() As Boolean
' IsDots: Determine if the currently "found" file is the "." or ".." directory
'
' Incoming parameters:
'