3 ms·
>I haven't used Windows seriously for a while, but I'm pretty sure you can use filenames without extensions now. Wasn't this always possible? even from DOS day
by vram22 9y ago
>I haven't used Windows seriously for a while, but I'm pretty sure you can use filenames without extensions now.
Wasn't this always possible? even from DOS days, in fact?
- int_19h 9y agoYes and no. In DOS, the filename is always FILENAME.EXT, and dot is not an arbitrary character is the name, but a separator. In FAT16 directory entries, you have two separate fields, 8 chars for filename, 3 chars for extension, both space padded. The dot isn't actually recorded, and only appears in reconstituted filenames. Consequently, it's not possible to distinguish "FILENAME" from "FILENAME.", and they are considered equivalent. Similarly, when you write something like * .* in DOS, the dot is a special symbol as well, and this really means "match any filename and any extension". So this will match FILENAME, because it still has an extension, which just happens to be blank. On the other hand, if you just use * , it will be treated as * . and hence only match files with a blank extension. In Win32, filenames are just strings, and dot is just a character. But the last dot in the name is still considered as separating extension from the name for purposes where it matters, like determining the app to open the file - i.e. "foo.bar.baz" is "foo.bar" with extension "baz". And if there are no dots, then the file is still considered to have an empty extension rather than no extension, and will therefore match . and similar globs. On the other hand, * is no longer treated as * . and matches any filename now.
- vram22 9y agoThanks for the detailed explanation.