Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I want to create a new file extension for a binary/text data file that will open on my own application (extension ".mylongfileextensionname" for example), will Windows list it with my aplication (considering that I already listed it on Windows Registry before)? There is a length limit, I mean, on my example should I use ".mylong" or any specific layout?

share|improve this question
add comment

2 Answers 2

up vote 6 down vote accepted

I always thought 255 total as in Breakthrough's answer but I found this to be contradictory as I started to double-check my thoughts:

Windows 2000 has a 254 character limit.
Windows XP has a 255 character limit.
Windows Vista and Windows 7 has a 260 character limit.

Path+Filename limit is 260 characters.

http://www.wincert.net/tips/microsoft-windows/windows-7/2427-windows-7-file-transfer-issue-destination-path-too-long.html

Confirmed on this Microsoft site:

http://windows.microsoft.com/en-US/windows-vista/File-names-and-file-name-extensions-frequently-asked-questions (expand "What is the maximum length of a file name?")

http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx

share|improve this answer
1  
fyi: msdn.microsoft.com/en-us/library/windows/desktop/… .. by using the "other" version of the file api you can use up to 32k chars for the path/filename. by "other" i mean the unicode one which is triggered by using unc paths ala "\\?\" –  akira Jan 28 at 22:14
add comment

Besides the fact that any filename cannot be longer then 255 characters, there is no limit imposed on a file extension length. This is because the file's extension is not separate from, but is a part of the filename itself.

While you are free to use any length of extension you wish, I would not recommend using a very lengthy one for one reason: convention. Most file extensions are three to four alphanumeric characters. Anything longer, or with funny characters, is going to "stand out" quite a bit more, be harder to memorize, and may be less likely to be adopted (again, it all depends). For a list of common file extensions, see this website.

Also, note that a file extension is completely arbitrary - it does not directly specify what the contents of a file are, it only implies what the contents should or could be.

share|improve this answer
add comment

protected by slhck Jun 23 at 8:57

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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