2Lars Erdman: This is how file name shortening algorithm works: It removes first several leading dots from name, and leaves three characters
after last dot as an extension (and skips characters in between). So, thanslation algorithm does not misinterpret anything.
It is safe to use extension for directories in DOS. Yes, originally, there were a convention that directories doesn't have an extension. But that convention was widely "violated". "Violated" is not anything bad. Directory, in any file system, including FAT, is a file, containing the list of directory entries (excluding some exotic file systems, which don't include FAT). So, any directory can have any name, with or without extension. This is safe, because there is no difference, how files and directories are stored on the file system. And I used DOS and never saw any problems when having directories with extension. :-)
PS: Lars, this is not my own algorithm, it was invented before me by Henk Kelder and Ko Myung Hun. It was worked for at least, a decade before I joined the fat32.ifs project. Nobody still complained, so far. I only enhanced this algorithm for exFAT (as exFAT, opposite to VFAT, does not contain short file names along with long ones. So, I added a bit of new code, generating the short file names from long ones, and restoring them back. The idea was got from
http://freedos-32.sourceforge.net/lean/specification.php -- see "Fabricating a short file name").