Using non-standard file extensions format

What I’m thinking of doing is creating my own filetype extensions not using the standard windows 3 character file extension format, (if it still exists?)

eg.

filename.header (contains file header info)
filename.original (original file locked)
filename.edited (original file edited)
filename.txt (import standard ascii text file)

In actual fact all filetypes will be ascii, readable in any text editor.

So for example, using the Xojo FileTypes filter, I can code it so the user can only open/save *.edited files. Which will also be within a strict folder structure under my main application. The only filetypes that can be imported from anywhere will be *.txt files, which can then only be saved and auto renamed *.edited under the edited files folder.

eg.

MyApp
-Header Data
-Original Files
-Edited Files
-App Preferences

I’ve tested the file extensions by setting up a FileType with various test extensions and it appears to work fine. Also, this question is a pre-cursor to questions I’ll be asking in the future regarding File IO operations and the Special Folder.

Anyway, apart from the strict folder structure, my main question here is are there any potential issues using non-standard extensions that I’m not aware of?

A custom filetype of yours may already exist (defined and used by someone else) ?

Ok thanks Emile. But does that really matter?

I’m aware that there is some sort of registry for file extensions. It doesn’t seem that the registry is strict, as in registering a domain name where there can only be one, but more of a ‘courtesy’.???

If I consider a JPEG file denoted as *.jpg then it will depend on what program I associate *.jpg files to be opened with - in Windows or MacOS. I think I have PhotoShop being the one - it could be MS Office Picture Manager or My Photo Album, etc… It shouldn’t really matter.

If a user selects my *.edited filetype in the finder/file manager, and if that extension is associated with my program then I guess it should launch and open the file. I’m not sure how to go about what happens with the other filetypes though.

This issue is now the “Main Event” with my software. This is the crucial part for file IO to work as I want.

What I want, is at odds with the standards.

I do not think so.

Why So?

You wrote the software,
You decide to use this file extension,
You put a code tag at the beginning of the data (just like rar, zip, gif, jpg, etc. files have).

And the user of your application can set the file type to belong the application they want / prefer.

But, this is IMHO, of course.

Thanks Emile. That’s very refreshing.

I’m a hobby/amateur programmer. Everything I do is new, but I have ideas, in the way I want things to work. The thing I always come up against is what are the general accepted standards.

For the Mac check out UTIs. There are imported and exported UTIs, which I think is a very suboptimal name. The exported UTIs are the file types that you define yourself. The imported ones are for the standard types like jpg so that your app can handle a jpg but it’s not the primary app like for the exported UTIs.

Thanks Beatrix, I’m developing for windows but much appreciated.

Windows has supported much longer extensions that 3 letters for a long time now
So I’d used long extensions that are unique perhaps starting with your app name then _ and some other descriptive bits

https://en.wikipedia.org/wiki/List_of_filename_extensions

@Axel Schneider

Thanks Axel & Emile. I’ve checked out that list and there aren’t too many extensions shown beyond the basic 3 character format. Therefore it does seem I can create my own extensions without conflict or repercussions.

@Norman Palardy
Thanks Norman. My initial tests and thoughts were that it all works fine. My concern was more about if it was “standard practice” and what issues there could be later on. Being a hobby programmer my Achilles heal will always be whether my ideas conform to the standards - simply because I don’t know them.

Example:
My software will only allow the user to open files from a custom list without using the standard OS dialog box. My view is that this makes it simpler for the user to not have to worry - as in a dedicated software and device.

Is this a “VALID” concept or poor programming practice?

As Emile pointed out, It’s my software and I should do what I want with it . . . I think I stretched that a bit far :slight_smile:

MS uses some long extensions so …

Thanks Norman.