Can you call Directory.GetFiles() with multiple filters?
Posted
by Jason Z
on Stack Overflow
See other posts from Stack Overflow
or by Jason Z
Published on 2008-10-02T15:58:21Z
Indexed on
2010/05/31
17:53 UTC
Read the original article
Hit count: 157
I am trying to use the Directory.GetFiles() method to retrieve a list of files of multiple types, such as mp3's and jpg's. I have tried both of the following with no luck:
Directory.GetFiles("C:\\path", "*.mp3|*.jpg", SearchOption.AllDirectories);
Directory.GetFiles("C:\\path", "*.mp3;*.jpg", SearchOption.AllDirectories);
Is there a way to do this in one call?
© Stack Overflow or respective owner