Поиск файлов на диске
Sub GetFindSub(ByVal d As String, ByVal f As String)
Try
Application.DoEvents()
Dim ListFiles As String() = IO.Directory.GetFiles(d, f)
Dim ListFolders As String() = IO.Directory.GetDirectories(d)
For Each item In ListFiles
ListBox1.Items.Add(item)
Next
For Each item In ListFolders
GetFindSub(item, f)
Next
Catch ex As Exception
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
GetFindSub("C:\", "*.txt")
End Sub