We can collect sub folder for another folder using a Reference to (scrrun.dll) , by this code :

VB Code:
  1. Option Explicit
  2. Dim FSO As New FileSystemObject
  3.  
  4. Private Sub cmdCollect_Click()
  5. Dim SubFolder As Folder
  6. Dim RootFolder As Folder
  7.  
  8. Set RootFolder = FSO.GetFolder("C:\)
  9. For Each SubFolder In RootFolder.SubFolders
  10.     Print SubFolder.Path
  11. Next
  12. End Sub


Can I do this with APIs , I prefer any method rather than (FindFirstFile,FindNextFile&FindClose) , if possible.

BTW : for VB6

Thanks