bodacydo
bodacydo

Reputation: 79309

How do you call the "happy-dog" part of file "happy-dog.png"?

I just realized I don't know how file is called in file.ext.

The whole file.ext is called a file or filename, ext is called extension but how do you call the file part itself of file.ext?

For example happy-dog.png. All the file/filename is happy-dog.png, extension is png but how do you call happy-dog?

It's not basename. Is it like titlename? Or filepart? Any ideas?

Upvotes: 0

Views: 37

Answers (2)

masterxilo
masterxilo

Reputation: 2778

FileBaseName[] in Mathematica.

Upvotes: 0

I believe there is no short name for this thing. Some libraries just refer to it with names like "filename-without-extension" or "filename-without-path-or-extension".

You could use the term "basename", because that is the program or function often used to generate this thing. It is not quite accurate because basename may or may not strip the extension depending on what arguments you pass it, but I think programmers would understand you.

Upvotes: 1

Related Questions