having filefilter problem
-
hi, when I use this bit of code to get the number of files with the extensions ".mp3, .wma, and .wav" as follows: int number_of_files = Directory.GetFiles(folderBrowserDialog1.SelectedPath, "*.mp3;*.wma;*.wav", SearchOption.AllDirectories).GetLength(0); it doesn't return any results. (the number_of_files integer is still 0). I tried this using only *.mp3 and got some results. Why doesn't this work? Am I not supposed to use the semi-colon symbol? IF so which one am I supposed to use? Thanks for your help.
-
hi, when I use this bit of code to get the number of files with the extensions ".mp3, .wma, and .wav" as follows: int number_of_files = Directory.GetFiles(folderBrowserDialog1.SelectedPath, "*.mp3;*.wma;*.wav", SearchOption.AllDirectories).GetLength(0); it doesn't return any results. (the number_of_files integer is still 0). I tried this using only *.mp3 and got some results. Why doesn't this work? Am I not supposed to use the semi-colon symbol? IF so which one am I supposed to use? Thanks for your help.
-
I think second parameter is a simple pattern, not a regexp. You can't do things like *.mp3|*.mpg
-
so what can I do? I'd prefer to not have to have multiple lines as when I eventually have to add found file strings to an array, it'll be somewhat confusin and if there's another way, needless. any ideas? thanks again.