In some cases I get the file name in ALL CAPS. What's wrong?
The file name is reported in the same format it was passed to the OS by the calling application. The caller can use short or long path names (or combine them) and can change the file case (Windows filesystems are case-insensitive).