Forum: english.stackexchange.com
Tags: <orthography><capitalization><programming><spacing><camel-case>
Title: Which is correct: "Filename", "File Name" or "FileName"?
Question: Which is correct: "Filename", "File Name" or "FileName"?

Answers:
sents: text: The original form of the word was "file name", as in the name of a file.
text: These days (and probably for a good few years), the compound "filename" is widely accepted and perhaps most commonly used.
text: Either is of course perfectly acceptable.
text: Do not, however, capitalise letters in the middle of a word, under any circumstances.
text: (Unless you are writing variable names in code.)
answer_details: author: english.stackexchange.com/users/184/Noldorin
score: 94
sents: text: Filename is in my experience the most common and in my opinion the best looking.
text: File name is also acceptable, but I would only use it rarely, perhaps in a parallel construction such as the file name and size .
text: I find word-medial capital letters distracting and unpleasant anywhere but program source code, so I would never even think of FileName .
text: Edit:
text: if that's the reason you're asking, in program source I would still use Filename for a class or filename for a variable, not FileName nor fileName , respectively.
text: The British National Corpus has 240 cites for filename and 72 cites for file name .
text: It's not possible to search case-sensitively, but several reloads of the random sample of specific entries gave me no matches for FileName .
answer_details: author: english.stackexchange.com/users/1506/Jon Purdy
score: 23
sents: text: The AHD has an entry for “filename”, so it is, at least, an established American English word.
text: Thus it is “correct” for some situations.
text: Update: the word “pathname” is also included in the American Heritage Dictionary: Fifth Edition .
text: So over time I will be changing my program variables from SettingFilePathName to SettingFilePathname.
answer_details: author: english.stackexchange.com/users/1727/Jeffrey L Whitledge
score: 8
sents: text: None of them. "filename" is not a proper noun, and thus should not be capitalized.
text: If you begin a sentence with the word, then it should be "Filename".
answer_details: author: english.stackexchange.com/users/1391/Sparr
score: 3
sents: text: Generally, I would say "filename", as that is what I have seen used in most software development textbooks.
text: That's not to say that this is the standard by which all words should be measured, but given that the word is generally used in relation to computers I would imagine that it is safe to use.
answer_details: author: english.stackexchange.com/users/2242/Will
score: 2
sents: text: Any two words (such as 'file name') used together for long enough periods of time end up with a single meaning in our collective language.
text: When that happens, you can combine the two, though it's not advisable for formal usage.
text: Words such as, for example, 'himself' are older, and common examples from the computer age include 'username', 'email', and 'desktop'.
text: For formal usage, consider spacing the words or using a hyphen, where appropriate.
answer_details: author: english.stackexchange.com/users/None/
score: 1
sents: text: The OED has no entry for "filename."
text: However, being a technical writer of 25 years, I have adopted this spelling because programmers and engineers prefer it.
text: Still, it seems odd to me.
answer_details: author: english.stackexchange.com/users/62538/Bob
score: 0

Summary of the answers:
Whilst the original form was "file name", "filename has generally become the most commonly used. However, "filename" does not appear in all dictionaries. It is possible that either is perfectly acceptable, however, you should probably not capitalise letters in the middle of words.
The original form of the word was "file name" as in the "name of the file". Recently, the compound form "filename" has become widely accepted and used. But it is not capitalised in the middle.File name as a two-word option is also acceptable.Filename with a first capital is acceptable. Historically, two words used long enough often end up becoming one in the collective language.Consider spacing the words.
Whilst the original form was "file name", "filename has generally become the most commonly used. However, "filename" does not appear in all dictionaries. It is possible that either is perfectly acceptable, however, you should probably not capitalise letters in the middle of words.
Either is of course perfectly acceptable.  Nowadays, the compound "filename" has become widely accepted and perhaps most commonly used. But in fact, the OED has no entry for "filename.", but due to programmers and engineers preferring it, it has become widely used.
The compound "filename" is widely accepted and perhaps most commonly used. However, "file name" is also both used and acceptable, but "FileName"  is not widely used, due to the distracting capitalization of letters in the middle of a word.
Whilst the original form was "file name", "filename has generally become the most popular form in use. However, "filename" does not appear in all dictionaries. It is possible that all three terms are equally acceptable, however, one should probably shy away from capitalising letters in the middle of words, as in "FileName".