
Originally Posted by
Peter Swinkels
Bonnie West:
Does this mean it doesn't really matter?

Originally Posted by
Tech99
Are you sure about that. Performance differs very very much between *.* vs. *. calls.
According to the documentation, FindFirstFile "searches a directory for a file or subdirectory with a name that matches a specific name (or partial name if wildcards are used)."
What that means is that the search pattern cannot guarantee that only files or only folders will be found. Files & folders can both have dot (.) characters in their names and it is also perfectly possible for both of them to not have any dot characters in their names.
Here's an example. Consider a directory that contains these files & folders:
New Folder
New.Folder
New Text Document txt
New Text Document.txt
The *.* search pattern would match all 4 of those files & folders. The *. search pattern, OTOH, would match New Folder and New Text Document txt.
So, as you can see, it isn't possible to instruct FindFirstFile to return files only or folders only. Performance differs of course because files usually have extension names and excluding them from the search will indeed result in a much faster directory listing.