Why does calling FindFirstFile with the pattern *.* match a name like Windows?
Edit: I guess I can also guess what’s happening, but is there any documentation on the reason as well?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In the blog post ‘How did wildcards work in MS-DOS?’ Raymond Chen describes how the original DOS wildcard matching was implemented. At the end of the post he points out how
*.*is handled as a special case in the Win32 wildcard matching algorithm.A quote from the post
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.