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
In VB6 you want to use FileSystemObject of the Microsoft Scripting Runtime. You can access to the scripting runtime by setting a reference to it.
The .NET framework has a similar but more capable set of file/directory handling object in the System.IO namespace
The following an example of how to use FileSystemObject in VB6.
Dim FSO As FileSystemObject
Dim Folder As Folder
Dim SubFolder As Folder
Dim File As File
Set FSO = New FileSystemObject
Set Folder = FSO.GetFolder("C:\")
For Each File In Folder.Files
Debug.Print File.Name
Next File
For Each SubFolder In Folder.SubFolders
Debug.Print SubFolder.Name
Next SubFolder
Set Folder = Nothing
Set SubFolder = Nothing
Set FSO = Nothing