Jack,
Here is some code that you might be able to modify for your needs:
'Be sure to have an Imports System.IO statement in the class that contains
this code
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
To get the process started:
DisplayFolderInfo("c:\Test")
Kerry Moorman
"Jack Russell" wrote:
I need to drill down from a directory through all the sub directories
and build up a list of files. I have VB6 code to do this but it uses
APIs etc and am hoping that there is a better way of doing in .net 2003
I would appreciate any help or examples that anyone can give me
Thanks
Jack Russell