Eu suspeito que seja por causa do comportamento mencionado no blog de Raymond Chen (aviso - não documentação real).
For example, if your pattern ends in .*, the .* is ignored. Without this rule, the pattern *.* would match only files that contained a dot, which would break probably 90% of all the batch files on the planet, as well as everybody's muscle memory, since everybody running Windows NT 3.1 grew up in a world where *.* meant all files.
Seu padrão é *t.*
, que é alterado para, suponho, *t
, que corresponde a 5bbb.exeTxt
. Não tenho certeza de como DirectoryInfo.GetFiles
funciona, por que não apenas testá-lo?
Parece que os nomes curtos também são correspondidos ou os três primeiros caracteres da extensão.
G:\junk\filetest>dir
Volume in drive G is Extended2
Volume Serial Number is 3E2F-7A67
Directory of G:\junk\filetest
09/09/2014 10:01 AM <DIR> .
09/09/2014 10:01 AM <DIR> ..
09/09/2014 09:59 AM 6 test.txtR
09/09/2014 10:01 AM 2 test.txtrrr
2 File(s) 8 bytes
2 Dir(s) 162,957,000,704 bytes free
G:\junk\filetest>dir *.txt
Volume in drive G is Extended2
Volume Serial Number is 3E2F-7A67
Directory of G:\junk\filetest
09/09/2014 09:59 AM 6 test.txtR
09/09/2014 10:01 AM 2 test.txtrrr
2 File(s) 8 bytes
0 Dir(s) 162,957,000,704 bytes free
G:\junk\filetest>dir /x *.txt
Volume in drive G is Extended2
Volume Serial Number is 3E2F-7A67
Directory of G:\junk\filetest
09/09/2014 09:59 AM 6 TEST~1.TXT test.txtR
09/09/2014 10:01 AM 2 TEST~2.TXT test.txtrrr
2 File(s) 8 bytes
0 Dir(s) 162,957,000,704 bytes free