How to search for files??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm upgrading from Access XP to VB.NET, and having trouble at several points along the way. Probably the most important, at least to the application I upgraded for, is programatically searching for files. Office VBA has a FileSearch class that does this for you; .NET doesn't seem to have anything like this

Could someone point me in the right direciton? My VBA code looks like

Dim X as New Application.FileSearc
X.NewSearc
X.Filter = "*.doc; *.wpd; *.rtf; *.htm
X.LookIn = "C:\
X.IncludeSubFolders = Tru
X.Execut

How do I do this in .NET? Please don't tell me to write a recursive function / class using the Dir function??
 
F said:
I'm upgrading from Access XP to VB.NET, and having trouble at several
points along the way. Probably the most important, at least to the
application I upgraded for, is programatically searching for files.
Office VBA has a FileSearch class that does this for you; .NET
doesn't seem to have anything like this.

Could someone point me in the right direciton? My VBA code looks
like:

Dim X as New Application.FileSearch
X.NewSearch
X.Filter = "*.doc; *.wpd; *.rtf; *.htm"
X.LookIn = "C:\"
X.IncludeSubFolders = True
X.Execute

How do I do this in .NET? Please don't tell me to write a recursive
function / class using the Dir function??

No, but you can write a recursive function using the System.IO.DirectoryInfo
class.


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Back
Top