Before-the-dot-in-a-file-name, what is it called?
-
11-09-2019 - |
Question
After-the-dot-in-a-file-name, it is called extension.
Solution
It's called the basename. In fact, there's a unix/linux command for it:
basename - strip directory and suffix from filenames
OTHER TIPS
The "base name," "basename," "primary name," "filename," "file name," or the "file."
Base name or file name.
Ruby calls it the basename. That's a good, succinct name that I generally go with in other environments too.
Basename or primary file name.
I call it filename. So its like Filename.ext
I've always called the everything before the dot and the extension the "file name".
I'm not a Ruby or Linux guy, so I guess I missed the BaseName thing. It makes for all sorts of interesting naming convention hilarity. I'm in the
Filename.Ext
camp, although that, too can be a FileName. (or maybe a FileNameWithExtension).
Once upon a time, the term Leafname was used, although that typically included the extension. I mention this for historical value, and since its dropped out of usage, it might be redeemable for this purpose.
The boost::filesystem library calls it basename as well.