Private Function RecursiveSearch(ByVal path As String) As Boolean Dim dirInfo As New IO.DirectoryInfo(path) Dim fileObject As FileSystemInfo For Each fileObject In dirInfo.GetFileSystemInfos() If (fileObject.Attributes And FileAttributes.Directory) = FileAttributes.Directory Then RecursiveSearch(fileObject.FullName) Else Me.lstDirectory.Items.Add(fileObject.FullName) End If Next Return True End Function
Dim files As String() = Directory.GetFiles(path, "*.*", SearchOption.AllDirectories)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)