Hello once again![]()
I want to list all folders from a given directory. I've done this code but it only lists in one level and I want to list all levels.
Can you guys give help to make it work?
VB Code:
Public Sub ListDir(path As String) Dim NameFolder As String NameFolder = Dir(path, vbDirectory) Do While NameFolder <> "" If NameFolder <> "." And NameFolder <> ".." Then If (GetAttr(path & NameFolder) And vbDirectory) = vbDirectory Then MainForm.MSHFlexGrid1.AddItem (path & NameFolder & "\") End If End If NameFolder = Dir Loop End Sub
Thank you




Reply With Quote