.NET Framework Bookmark and Share   
 index > .NET Base Class Library > Problem with Directory.GetFiles Method (String, String) -- gives odd results
 

Problem with Directory.GetFiles Method (String, String) -- gives odd results

Hi guys,

First of all if that subject has been discussed already I'd appreciate any links to that thread. Thanks.

If not, today I've noticed a very strange results returned from GetFiles method.

Let's say I have a directory with lots of files in there and I want to search themagainst particular pattern. After invoking GetFiles("some path", "V0861*.*") below is what it returned:

Lots of file starting with "V0861" (that's good)and... two files with folowing names:

V0527_*

V0427_*

I have repeated testfor other file name combinations and for some of them result where as expected, where for others result included files that does not match searched pattern at all.

The worst thing is that the same bug Ireproduce using command line's dir like: dir V0861*.* against the same directory

To me it looks like something is wrong with low-levelsystem file searching functions or maybe it's some kind of hidden feature which I don't simply understand Smile

I'd appreciate any suggestions. Thanks!

.

Sergiusz

Sergiusz.Bezniakow
Use dir /x *.* to verify that the short file names still match the long file names.
nobugz
Use dir /x *.* to verify that the short file names still match the long file names.
nobugz

You can use google to search for other answers

Custom Search

More Threads

• Website deployment
• Serialize COM Object(s)
• Dynamic disks and WMI
• Rijndael Encryption Issue
• Saving an Image in user settings?
• Hashtables and Data initialization
• how can i show a icon in a combobox?
• Serial Port Issue while using it for polling
• Collection(Of Thread) - Store Thread objects problem
• Loadfrom and CreateInstance failed in Beta2