0

I have a program which creates certain save files during its use. Technically they are XML files, however I don't want to use the .xml extension as I will be modifying the shell so that my program opens when the files are double clicked in Explorer.

Is there any guidance on what file extensions I can effectively "invent"? I can't find any official guidelines anywhere.

I want to use .senx but I have no idea if this is safe to do so?

matronator
  • 465
  • 6
  • 13
KingCronus
  • 4,509
  • 1
  • 24
  • 49
  • How many users you think are going to be using this app. and what are the chances that some other installed app. uses `.senx` also. I went to `http://www.file-extensions.org/` and tried it with no hits. So just go for it. – John Alexiou May 13 '12 at 14:17

1 Answers1

11

There is no "official" registry of file extensions (although there probably should be).

An Internet search will reveal several different sites that contain unofficial listings of the file extensions in common use by various applications, but if you go by that, there are hardly any file extensions still available to choose from.

The important thing is to figure out which applications your target audience is likely to have installed, and then make sure that your custom file extension doesn't conflict with any of those. (If you must do so, you also must provide the user with an option to revert your file extension associations, and preferably make it a configurable option during installation.)

Remember that there's no reason you should have to limit yourself to three or even four character file extensions. You can use as many as you need, which exponentially increases the likelihood that your choice will be unique. For example, Visual Studio persists its environment settings in a .vssettings file; it's very unlikely any other application will conflict with that any time soon.

In fact, this is Microsoft's official advice:

Do Not Use Short File Name Extensions

Long file name extensions offer the following advantages:

  • The limited length of short extensions make them prone to extension collisions. An extension collision occurs when the same extension is used to classify multiple file types. Using long extensions significantly decreases the chances of a collision.

  • Short file names tend to be somewhat cryptic. Long extensions tend to be more meaningful because additional information can be embedded in the extension.

For more information, see file name extensions.

Community
  • 1
  • 1
Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
  • Even if there is, it's probably going to be a maintenance nightmare. – BoltClock May 13 '12 at 13:59
  • 1
    `.vssettings` could hypothetically collide with another application with `VS` for an acronym, so something like `.visualstudioprefs` would be even better, since these abbreviations are chosen semantically rather than randomly, using the longer `settings` over `prefs`, for example, is not an improvement. – Kevin Reid May 13 '12 at 14:22
  • Yes, there are *even better* choices. The point was not limiting yourself to 3–4 characters. – Cody Gray - on strike May 14 '12 at 17:25
  • 1
    Some sites do better than others with file extensions. You can actually pre-register file extensions at FileInfo.com so you get a better chance of others not using the file extension you want to use. http://www.fileinfo.com/developers & http://www.fileinfo.com/contact?form=developer . So, you could submit the .senx extension there. FileInfo.com publishes your file type description and file/application icons too. – spurgeon May 17 '12 at 21:34
  • That's great for FileInfo and anyone who cares. But it's not an *official* repository, and there's nothing to keep me from writing an app that collides with something you've registered on FileInfo. Therefore, it's not a very useful solution. All of this is addressed in the first two paragraphs of my answer. – Cody Gray - on strike May 17 '12 at 22:32
  • Agreed, anyone can use whatever file extension they want, even if it conflicts with another application. However, many developers search file extensions websites before selecting a new one for their application. Therefore, my point wasn't that it solves KingCronus' file association invention/conflict problem, but it does deter other developers from using the same extension as you--which is a useful thing for developers and software users. – spurgeon May 18 '12 at 14:12