Hi,
Well, all you have to do is use the GetFiles method in IO.Directory to get the path and matching extensions in that directory.
VB.NET:
Function GetMatchingExtensions(ByVal Filter As String, ByVal Directory As String, ByVal SearchSubDirectories As Boolean) As String()
If SearchSubDirectories Then
Return IO.Directory.GetFiles(Directory, Filter, IO.SearchOption.AllDirectories)
Else
Return IO.Directory.GetFiles(Directory, Filter, IO.SearchOption.TopDirectoryOnly)
End If
End Function
Call upon this and list everything in listbox by:
For Each file As String In GetMatchingExtensions("FILTER", "DIR", False)
ListBox1.Items.Add(file)
Next
Just convert this to C# if you want.
Regards,
iProgramIt