The System.IO.Directory Class should help you here.
Also you may want to build a catalog system or find a system that supports an API. This way you dont have to walk a directory structure every time the user performs a query.
Basically you can do (pseudo code, adjust to fit):
Dim fn as File
For Each fn in System.IO.Directory.GetFiles(SomePath,"*.*",System.IO.SearchOption.AllDirectories)
' Do something with the fn
End For
Now there is no way around the NTFS ACL's and you would need to handle this as appropriate.
Have a look at this post to hook into Windows Desktop Search from C#.
Microsoft Windows Search 3.x SDK
Brief Description
Version 1.0
Download the Windows Search Software
Development Kit to explore sample
applications and develop using Visual
Studio, C#, and .NET technology.
Update 1
Function that does things with files in directories (pseudo code, adjust to fit):
Public Function MyDirectoryFunction(ByVal dir as String, ByVal fileMatch as String, ByVal beRecursive as Boolean)
Dim fn as File
Dim searchOpt as System.IO.SearchOption
If beRecursive = True Then
searchOpt = System.IO.SearchOption.AllDirectories
Else
searchOpt = System.IO.SearchOption.TopDirectoryOnly
End If
If String.IsNullOrEmpty(fileMatch) Then
fileMatch = "*.*"
End If
For Each fn in System.IO.Directory.GetFiles(dir, fileMatch, searchOpt)
' Do something with the fn
End For
End Function