photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: afengler on March 13, 2023, 09:31:24 PM

Title: Unexpected Sort Profile Behaviour
Post by: afengler on March 13, 2023, 09:31:24 PM
When using the Sort Profile "File Format", my 3 file types are displayed in the order:
ARW
TIF
JPG.
I was expecting an alphabetic sort. Not a problem, just confusing at first.

IMatch 2021.18.4 (64-bit) Win 10 Pro
Title: Re: Unexpected Sort Profile Behaviour
Post by: Mario on March 13, 2023, 11:49:54 PM
This profile does not sort by extension (!) but by the name of the format (id). By the name IMatch assigns to the format, which may (usually will) differ from the file format extension.

You can e.g. see the file format by using the corresponding attribute in a File Window Layout or by looking at the {File.Format} variable.
Title: Re: Unexpected Sort Profile Behaviour
Post by: afengler on March 14, 2023, 06:27:34 AM
Interesting. The {File.Format} sequence is
SONY
TIFF
JPG
which is also not alphabetic but perhaps based on some internal IMatch list?
Title: Re: Unexpected Sort Profile Behaviour
Post by: sinus on March 14, 2023, 07:10:19 AM
Hmm.  :o

I have no idea.
I have the same results as afengler here.
If I use VarToy, I get:

Ext = {File.Ext}
ExtS = {File.ExtS}
Format = {File.Format}

Ext = psd
ExtS = psd
Format = PSD

Ext = tif
ExtS = tif
Format = TIFF

Ext = nef
ExtS = nef
Format = NEF

Ext = jpg
ExtS = jpg
Format = JPEG

Ext = png
ExtS = png
Format = PNG

What I wonder, that Ext and ExtS give always the same result. But this is true since a very long time, so this maybe has nothing to do with the problem here.

But the difference with File.Format is not very big, it uses capital letters and e.g. JPEG instead jpg.

Title: Re: Unexpected Sort Profile Behaviour
Post by: Mario on March 14, 2023, 09:18:21 AM
Quote from: afengler on March 14, 2023, 06:27:34 AM... which is also not alphabetic but perhaps based on some internal IMatch list?
Correct.
If you want to sort files by their extension alphabetically, sort by "File Extension", not by by file format.

Quote from: sinus on March 14, 2023, 07:10:19 AMWhat I wonder, that Ext and ExtS give always the same result.

A relic from olden times, or for users who still have to deal with FAT-formatted media.
From the IMatch help:

"These variables are identical to the variables without the "S", but use the short file names supplied by Windows."

On FAT drives when extensions with more than 3 characters were used (.aphoto), not all applications worked with that so Windows provided a shortened file name and extension. These variables give you access.
Title: Re: Unexpected Sort Profile Behaviour
Post by: afengler on March 15, 2023, 02:12:19 AM
Thanks. New profile 'File Extension' works fine.