A path, the general form of the name of a file or directory, specifies a unique location in a file system.

"Filename" is a compound, but how about "filepath"/"file path"? "Filepath" seems incorrect to me, but as stated above, a related compound exists.

  • 1
    If you'd lived centuries ago, you'd probably have insisted on the two-word form foot path. Or you could have compromised with foot-path so people could gradually get used to modern footpath through an intermediate format. Jan 26 '18 at 17:54
  • I've converted my earlier comment to an answer, after trying to find any sort of formal documentation of the distinction and failing. Jan 26 '18 at 19:44
  • Possible duplicate question: english.stackexchange.com/questions/389432/….
    – Jesse Ivy
    Jan 26 '18 at 21:17

This is a technical term, used in discussing computer data storage. Both forms, filepath and file path, are used, but which one is used is often dependent on context. While I can’t find any specific reference for usage in context, my experience has been that filepath, as an unhyphenated compound word, is generally used when discussing it as an entity (e.g., “You’ll need to set the filepath before writing out any data.”), but file path, as two words, is generally used when referring to a particular attribute of a file (e.g., “The file path of the JonesCo proposal is C:\Users\jsmith123\Documents\Proposals\JonesCo.docx.”

  • This is a gem explanation that helps me elucidate my own intuition. I've found it invaluable when writing code, to be able to explain to others why I sometimes wrote filepath versus file_path. At some subconscious level, I knew why I was doing this, but I couldn't consciously process why.
    – Dave Liu
    Jul 12 '19 at 20:43
  • I have trouble understanding how the filepath of the JonesCo proposal is different from its file path. Maybe you also mean this? Use filepath when it is the whole object of the sentence. Use file path when it is part of the complete object of the sentence.
    – eisenpony
    Feb 7 '20 at 18:12
  • 1
    @eisenpony - Don't try to apply strict grammatical interpretation to terms of art/jargon from an industry. A filepath is an entity, independent of any particular file; a file path is an attribute of a particular file (even if we're not specifying what particular file we're talking about). In a program, I can set a filepath, and then use that filepath to create a new file, whose file path attribute is the contents of the filepath entity I created and stored a value in earlier. Feb 10 '20 at 12:18

The general trend is how FumbleFingers described.
If in doubt, I type (or copy & paste) an expression as a single word into dictionary.com. It may tell me it knows that word. It may return it with a hyphen. If it doesn't recognise it, I then write it as two words.
That's the only way I know to be consistent in always writing words the same way.


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