Why does calling FindFirstFile with the pattern *.* match a name like Windows?
Edit: I guess I can also guess wha
*.* matches everything in the target directory.
This is because *. matches up to the final period; if there is no period in the name then that name is treated as if it ended in a period; so *. matches only names beginning with a period and names containing no period (.afile / adirname) if you add a * on the end for *.* then it also matches beyond the final period so includes file names containing a period, this covers all possible file names.
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.