Using non-standard file extensions format

  1. 2 weeks ago

    Steve K

    Mar 11 Melbourne, Australia
    Edited 2 weeks ago by Steve K

    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?

  2. Emile S

    Mar 12 Europe (France, Strasbourg)

    @SteveKelepouris 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) ?

  3. Steve K

    Mar 12 Melbourne, Australia

    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.

  4. Emile S

    Mar 12 Europe (France, Strasbourg)

    @SteveKelepouris What I want, is at odds with the standards.

    I do not think so.

  5. Steve K

    Mar 12 Melbourne, Australia

    Why So?

  6. Emile S

    Mar 12 Europe (France, Strasbourg)

    @SteveKelepouris 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.

  7. Steve K

    Mar 12 Melbourne, Australia

    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.

  8. Beatrix W

    Mar 12 Pre-Release Testers Europe (Germany)

    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.

  9. Steve K

    Mar 12 Melbourne, Australia

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

  10. Norman P

    Mar 12 Xojo Inc

    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

  11. Axel S

    is not verified Mar 12 Europe (Germany, Erfurt)

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

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

  12. 3 days ago

    Steve K

    Mar 20 Melbourne, Australia
    Edited 3 days ago by Steve K

    @Axel S

    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 P
    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 :)

  13. Norman P

    Mar 20 Xojo Inc Answer

    @SteveKelepouris My concern was more about if it was "standard practice" and what issues there could be later on.

    MS uses some long extensions so .....

  14. 2 days ago

    Steve K

    2 days ago Melbourne, Australia

    Thanks Norman.

or Sign Up to reply!