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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…