A Repasky

A Repasky

  • NA
  • 231
  • 182.9k

DirectoryInfo.EnumerateFiles(filter)

Jul 11 2012 5:22 PM
I am using the statement

DirectoryInfo.EnumerateFiles(filter) where filter is a string.  I want to set filter to be able to search for 2 different strings.  How can I do that?

If I search for one string then:
 filter = "CM_*";

But I want to search for 2 different strings.

 Should I use:
 filter = "CM_*, CDH_*";

I search online and cannot find the answer or if I can do this.  Filter is a parameter coming in and it all has to be in one field.  I thought I had figured it out but I cannot remember what I did.

Thanks,
arep

Answers (3)