There is a length limit to Windows file extensions?
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?
Solution 1:
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
Solution 2:
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.