hharry,
This subprocedure loops through all the files and folders for a particular
starting folder:
Private Sub DisplayFolderInfo(ByVal folder As String)
Dim di As New DirectoryInfo(folder)
Dim fi As FileInfo
MsgBox("Folder: " & folder)
For Each fi In di.GetFiles
MsgBox("File: " & fi.FullName)
Next
Dim subDI As DirectoryInfo
For Each subDI In di.GetDirectories
DisplayFolderInfo(di.FullName & "\" & subDI.Name)
Next
End Sub
You get the process started like this:
DisplayFolderInfo("c:\TestDisplayFolders")
Kerry Moorman
"hharry" wrote:
Hello All,
I have a ListView control which displays files from a remote server.
Some ListViewItems are folders which have an undetermined number of
sub-folders.
What I need to do is programatically expand all folders/sub folders and
download the files within.
Has anybody coded a function which will loop thru a folder and all
subfolders ?
Thanks in advance