Multiple expressions for search pattern in GetFiles

Libertarian

Member
Joined
Aug 26, 2003
Messages
7
Is it possible to construct a call to GetFiles that would search for multiple file types?

This doesnt work:

Directory.GetFiles(dir, "*.txt;*.doc;*.dat")

Doesnt work with commas either. But you get the idea. I want to get files according to a search pattern that has more than just one filter.

Thanks.
 
Youll have to manually do it with a loop searching though all the files in the string array.

A good idea would probably put all the found items in an ArrayList.
 
Back
Top