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 t
Directory.GetFiles()
mp3
jpg
i don t know what solution is better, but i use this:
String[] ext = "*.ext1|*.ext2".Split('|'); List files = new List(); foreach (String tmp in ext) { files.AddRange(Directory.GetFiles(dir, tmp, SearchOption.AllDirectories)); }