Basically, I have this code:
DirectoryInfo dir = new DirectoryInfo(@'\\MYNETWORK11\ABCDEFG\ABCDEFGHIJKL\00806\'); FileInfo[] files = dir.GetFiles('200810*');
I expect it to match any files starting with 200810. However, it’s matching files named
20070618_00806.bak and 20070817_00806.bak (the stars aren’t in the filename, that was the only way I could include the underscore)
I tried it with dir from a command prompt, and it matches those files also. Why?
Edit:
Maybe using C: as the example was not a good thing. The directory I’m actually querying is a network share \\MYNETWORK11\ABCDEFG\ABCDEFGHIJKL\00806\
If checking against the short name has anything to do with it, won’t 20070817_00806.bak be 200708~1.bak? That doesn’t match either
msdn states that
Could this be the cause?