searchPattern question (System.IO.Directory.GetFiles)

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

Guest

Hi

I want to filter the files according to its extension, but I do not know how to use "multiple" extensions in the searchPattern paramter in System.IO.Directory.GetFiles fucntion. For exmaple: I want to filter both *.mp3 and *.gif, but I do not know how to put it in the search pattern. I tried like "*.mp3, *.gif", but it does not works

Does someone knows how? Any suggestions could be very useful

Thanks in advance
 
* "=?Utf-8?B?bHR0MTk=?= said:
I want to filter the files according to its extension, but I do not
know how to use "multiple" extensions in the searchPattern paramter in
System.IO.Directory.GetFiles fucntion. For exmaple: I want to filter
both *.mp3 and *.gif, but I do not know how to put it in the search
pattern. I tried like "*.mp3, *.gif", but it does not works.

That's not supported, you will have to perform 2 calls to 'GetFiles'.
 
Back
Top