19

After-the-dot-in-a-file-name, it is called extension.

skaffman
  • 398,947
  • 96
  • 818
  • 769
Delirium tremens
  • 4,623
  • 9
  • 46
  • 59

10 Answers10

25

It's called the basename. In fact, there's a unix/linux command for it:

basename - strip directory and suffix from filenames

skaffman
  • 398,947
  • 96
  • 818
  • 769
5

The "base name," "basename," "primary name," "filename," "file name," or the "file."

Nosredna
  • 83,000
  • 15
  • 95
  • 122
  • I think we can agree that these are all interchangeable. – Thomas Owens Jul 07 '09 at 20:00
  • 4
    I'd never use "filename" and "basename" interchangeably. They mean different things. – skaffman Jul 07 '09 at 20:02
  • 2
    I don't really agree with filename or file name. Don't most OS' consider the extension to be part of the filename? – Brandon Jul 07 '09 at 20:03
  • I hear "type the filename and the extension" all the time. It's a very common usage. – Nosredna Jul 07 '09 at 20:05
  • 2
    I think the confusion comes from the ambiguousness of filename. In `c:/program.exe`, filename either refers to `Program` or the entire string as a whole. – GManNickG Jul 07 '09 at 20:08
  • Common by people outside of IT maybe, but we should know better :P – Brandon Jul 07 '09 at 20:08
  • 2
    Historically, some systems have mandatory extensions and some have optional extensions. When the extension is mandatory, it can be seen as metadata, and the basename and the filename are the same thing – Nosredna Jul 07 '09 at 20:16
4

Base name or file name.

joeslice
  • 3,454
  • 1
  • 19
  • 24
3

Ruby calls it the basename. That's a good, succinct name that I generally go with in other environments too.

Joe White
  • 94,807
  • 60
  • 220
  • 330
2

Basename or primary file name.

Brandon
  • 68,708
  • 30
  • 194
  • 223
2

I call it filename. So its like Filename.ext

Matt
  • 74,352
  • 26
  • 153
  • 180
Arnkrishn
  • 29,828
  • 40
  • 114
  • 128
1

I've always called the everything before the dot and the extension the "file name".

Thomas Owens
  • 114,398
  • 98
  • 311
  • 431
1

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).

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
1

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.

Dave Gamble
  • 4,146
  • 23
  • 28
0

The boost::filesystem library calls it basename as well.

Janusz
  • 187,060
  • 113
  • 301
  • 369