10

Given the file path:

/some/path/abc.txt

The filename is "abc.txt", and extension is "txt".

What is the "industry standard", unambiguous name for the "abc" part?


For reference, in both java's older java.io and newer java.nio libraries, filename means "abc.txt", and there is no term (ie the library APIs don't support) for the "abc" part.

closed as primarily opinion-based by gnat, Thomas Owens Nov 29 '16 at 19:44

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Microsoft used "FilenameWithoutExtension" as the term in the .NET framework. – Mike Nov 29 '16 at 20:14
  • The best term I've come across is "file name without extension". It doesn't exactly roll off the tongue though. – David Arno Nov 29 '16 at 20:15
  • 1
    I hereby propose "file stem" for adoption by the community. – Bohemian Nov 29 '16 at 20:15
  • filename = name + extension – qwerty_so Nov 29 '16 at 21:29
  • Would be nice if the unambigious name also worked for filenames.with.several.periods and .dotfiles. But I doubt you´ll even find a standard one for Windows only (the main platform that cares about extensions). – RemcoGerlich Nov 29 '16 at 21:55
6

I believe that's just called the "filename" as well, which makes thing fairly confusing:

Discussions of filenames are complicated by a lack of standardisation of the term. Sometimes "filename" is used to mean the entire name, such as the Windows name c:\directory\myfile.txt. Sometimes, it will be used to refer to the components, so the filename in this case would be myfile.txt. Sometimes, it is a reference that excludes an extension, so the filename would be just myfile. Such ambiguity is widespread and this article does not attempt to define any one meaning, and indeed may be using any of these meanings. Some systems will adopt their own standardised nomenclature like "path name", but these too are not standardised across systems.

If it's important, you'll have to make sure you clarify exactly what "filename" you're talking about.

  • 1
    You haven't answered the question. You've only offered reasons to support it being asked. – Bohemian Nov 29 '16 at 19:43
  • 4
    @Bohemian Actually, it confirms that this question is purely opinion-based. There is no standard term. What you're asking for just doesn't exist. – Thomas Owens Nov 29 '16 at 19:45
  • @Bohemian You are assuming the question has an answer. For my part, I call the pieces "filename" and "filename extension". So I actually agree with FirstLastName's answer. – Eric King Nov 29 '16 at 20:09
  • 1
    @ThomasOwens that's what I was afraid of :) I use "non-extension part of the filename", but surely someone somewhere must have named this thing. How about "file stem" – Bohemian Nov 29 '16 at 20:14
  • Actually some consider the path part of the file name. – candied_orange Nov 30 '16 at 0:36

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