I would like to know if there are some in built functions for the scenario that is described below :
The input is the path of a parent folder. Wat the function must
For VB6.0 I would make use of the FileSystemObject and a small recursive function.
Sub test()
Dim fso As New Scripting.FileSystemObject
Dim files As New Collection
Dim file As Scripting.file
GetFilesRecursive fso.GetFolder("C:\YourFolder"), "zip", files, fso
For Each file In files
Debug.Print file.Name
Next file
End Sub
Sub GetFilesRecursive(f As Scripting.Folder, filter As String, c As Collection, fso As Scripting.FileSystemObject)
Dim sf As Scripting.Folder
Dim file As Scripting.file
For Each file In f.Files
If InStr(1, fso.GetExtensionName(file.Name), filter, vbTextCompare) = 1 Then
c.Add file, file.path
End If
Next file
For Each sf In f.SubFolders
GetFilesRecursive sf, filter, c, fso
Next sf
End Sub
This will not be lightning fast, though. Maximum performance can only be gained by directly using Win32 API functions like FindFirstFile and FindNextFile.