18

I'm finishing up my app for iPad, and the filename extension (used mostly so that Mail and Dropbox know what program to open the files in) is 12 characters long. The only filename extension that is anywhere near as long is tax2010. Why is there so little variation on this topic, and what kind of problems can I expect by using a long filename extension for my app? These files will be mailed, copied, and shared*.

In all tests, it works perfectly.

* I hope.

5 Answers5

22

A lot of developers were at least using computers back when long extensions where a technical restriction. Even today, there are still programs in active use that choke on things such as spaces in file paths and long extensions.

As long as you don't suspect that your files will need to be used by these programs, there isn't a technical reason to stop you.

Do please remember though, that the short extensions that can be comprehended in a single glance will be much better for your users. So while .resources is a great example, .customhatbymycompany is definitely not.

Dan McGrath
  • 11,181
  • 6
  • 57
  • 82
10

File extensions are used to distinguish between different types of files, not to tell a story. That's why they are short: even with three letters length, the chances to have a collision on the same machine are pretty small.

Long extensions mean less space for the remaining path and file name. Maybe in modern operating systems and software it doesn't matter since they accept very long file paths. Sadly, this is not the case with Microsoft, where .NET Framework still cannot manage paths longer than 259 characters. 12 characters taken for extension means 246 characters left for the path without extension. In some cases, it may be a problem.

Since this issue does not apply in your particular case, the only reason to avoid long extensions is if file names, including extensions, are typed by the user, especially on mobile devices where typing can be hard.

8

Longer filenames:

  • Take more typing, resulting in more effort / misskeys
  • Take up more screen space
  • Are a break with tradition
  • Are not important because file extensions are for machines not people
  • Take up valuable characters in systems with a restriction on path length

Whether or not these considerations are a problem for your application is a matter for you and your users.

Kramii
  • 14,199
  • 5
  • 46
  • 64
7

As @Anthony said in the comments, a three letter (on DOS->Windows line) file extension is a historical remnant. Nowadays, it is no longer a restriction with modern operating systems, although it remains curiously common.

Since it is expected that, as time goes by, that practice will slowly be abandoned, I hazard that you could go with a longer file extension, especially if your tests confirmed that in your environment it "works okay".

The only problem that I can guess is that in some cases it will be shortened to "tax".

TRiG
  • 1,172
Rook
  • 19,947
1

I can’t speak for iPad apps, but I’ve been using 5- and 6-character extensions for file types for my Windows apps for quite a while now with no problems. And I don’t think Linux ever had an issue with it, so it’s no problem there either. Just don’t use spaces or special characters, as some programs may not properly deal with them if they try to use the file name as part of a command line parameter.

TRiG
  • 1,172
GrandmasterB
  • 39,412