c# EnumerateFiles wildcard returning non matches?
- by Sam Underhill
As a simplified example I am executing the following
IEnumerable<string> files = Directory.EnumerateFiles(path, @"2010*.xml",
SearchOption.TopDirectoryOnly).ToList();
In my results set I am getting a few files which do no match the file pattern. According to msdn searchPattern wildcard is "Zero or more characters" and not a reg ex. An example is that I am getting a file name back as "2004_someothername.xml".
For information there are in excess of 25,000 files in the folder.
Does anyone have any idea what is going on?