File type via file data/meta data instead of extension

Hi,

I am a long time Directory Opus user (I started on the Amiga with Directory Opus 4). I am wondering if it is possible to identify filetypes via the file/meta data and not a filename extension.

This is how it was done on the Amiga, and I find file extensions as a whole to be a pain in the bottom.

I still do alot with the Amiga and that rarely used filename filetypes, but instead cpould be configured to look within the file for metadata (for example a jpeg image has JFIF approx 7bytes into the file).

Thanks

In which context(s)? It's already done that way for things like the image viewer (for some formats, at least).

In all contexts. So on Directory opus on the amiga I can create a file type based purely on the 'header' of the file. I know that the image viewer in the newer versions does identify 'some' images without a filetype.

An example if i have two zip files one name 'bob.zip' and one named 'bob' double clicking will bring up a "Select an app to open filename" selector, however if Directory Opus looked at the header it would know that the first two bytes are $5045 (PK) and treat it like a zip file.

So in essence the filetype configurator works like it did in 1994 which is far more bullet proof than a filename extension.

Lots of file types are really (specially made) zip files with different extensions. Overriding the Windows filetype system like that for them would break a lot of programs/files by opening them as archives instead of opening them in the programs they're made for.

You could do something by overriding the double-click action for All Files with a script that looks at the headers before deciding what to do, but I'm not sure it would be worth it. It would probably cause more problems than it solved.