Take the following file name:


Is there any term for the name "Example", as opposed to "Example.txt"? Either one of those two can be referred to as the "file name", although as Kristina Lopez seemed to suggest in the comments, it can be helpful at times to use "file name" to refer specifically to the part before the extension.

Is there a general word that is specific to that interpretation, and if so, what would it be? This doesn't have anything to do with the folder path of the file, just the name of the file itself.

My research is currently showing that there's likely no standard name for this (although certain entities may have their own phrases that they use). In .NET, for instance, the function Path.GetFileNameWithoutExtension doesn't really use any special terminology, and almost exactly the same phrase is used in various other contexts.

To follow the rule for the single-word-requests tag, this sample sentence is included:

We need the software to provide two separate options for a file name, one for the <"base name">, and one for the extension.

Semi-standard words are fine, but not anything that's specific to one particular framework, company, etc.

  • 1
    It is actually called "basename", e.g., stackoverflow.com/questions/2235173/… – jimm101 Jan 4 '18 at 19:24
  • @jimm101 The first couple of answers seem to suggest that being used to refer to "Example.txt". – Panzercrisis Jan 4 '18 at 19:27
  • 1
    @Panzercrisis I clarified and put an answer. The premise is wrong--extensions aren't recognized as meaningful on every OS. – jimm101 Jan 4 '18 at 19:30
  • 3
    This is not an English question, but rather a programming question. – tchrist Jan 4 '18 at 19:34
  • It's both English and programming. It's asking for an English term related to programming. In another human language, the term would change. – Panzercrisis Jan 22 '20 at 17:05

Generally, basename is correct.

Not all OSes consider the basename.txt format to be meaningful. In older MS/IBM DOS and Windows, the format was 8.3, which was 8 characters followed by a dot followed by 3 characters. Unix/linux doesn't do this--the '.' is just an acceptable character. So there likely isn't much of a "standard" term, although many languages refer to a basename concept for decomposing filenames.

  • Actually there is a basename command which removes the "path", but also (optionally) a given suffix. – Will Crawford Jan 4 '18 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.