25

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.

6
  • Microsoft used "FilenameWithoutExtension" as the term in the .NET framework.
    – Mike
    Commented Nov 29, 2016 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
    Commented Nov 29, 2016 at 20:15
  • filename = name + extension
    – user188153
    Commented Nov 29, 2016 at 21:29
  • 1
    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). Commented Nov 29, 2016 at 21:55
  • 2
    I don't see the question as opinion-based. It is asking for a standard term. The answer is that there is none. People may provide their opinion of what the term should be, but it wouldn't be an answer to the question.
    – user36800
    Commented Oct 30, 2020 at 20:20

1 Answer 1

7

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.

5
  • 2
    You haven't answered the question. You've only offered reasons to support it being asked.
    – Bohemian
    Commented Nov 29, 2016 at 19:43
  • 5
    @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
    Commented Nov 29, 2016 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
    Commented Nov 29, 2016 at 20:09
  • 5
    @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
    Commented Nov 29, 2016 at 20:14
  • Actually some consider the path part of the file name. Commented Nov 30, 2016 at 0:36

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