Additional sort order by exif fields
Moderators: Hacker, petermad, Stefan2, white
Additional sort order by exif fields
Hello.
Additional sort order does not work as expected for me.
Custom columns setup:
Image: https://i.imgur.com/NTJagDB.png
View mode setup:
Image: https://i.imgur.com/hSL9wWd.png
Result Correct sort by TimeH, but not by DateM and DateH:
Image: https://i.imgur.com/mtZ3scf.png
Additional sort order does not work as expected for me.
Custom columns setup:
Image: https://i.imgur.com/NTJagDB.png
View mode setup:
Image: https://i.imgur.com/hSL9wWd.png
Result Correct sort by TimeH, but not by DateM and DateH:
Image: https://i.imgur.com/mtZ3scf.png
Re: Additional sort order by exif fields
I confirm the bug for date/time formatter...
It seems that the exif.OriginalTime.H order is in fact the same as exif.OriginalTime, you could try with Time.M you will see that even sort is not working ..
It seems that the exif.OriginalTime.H order is in fact the same as exif.OriginalTime, you could try with Time.M you will see that even sort is not working ..
Re: Additional sort order by exif fields
How the dates in the normal Date column is displayed in your country, doesn't effect the sorting. Sorting is done on the property value, not on how it is displayed. The same applies to custom columns.
Related: TC7.03 Sort on custom column with substring of plugin value
Related: TC7.03 Sort on custom column with substring of plugin value
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Additional sort order by exif fields
That's correct and intentional, see my reply there.Sorting is done on the property value, not on how it is displayed.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Additional sort order by exif fields
It could be intentional but annoying to not be able to force sorting of column as it was text or using extracted value only from formater.
Re: Additional sort order by exif fields
I cannot clearly understand you all 
So there is no bug and I cannot sort by Hour, and then by Month and Day (if hour is same)?

So there is no bug and I cannot sort by Hour, and then by Month and Day (if hour is same)?
Re: Additional sort order by exif fields
No, there is no general problem to sort by date and time.vukisz wrote: 2022-06-07, 11:49 UTC I cannot clearly understand you all
So there is no bug and I cannot sort by Hour, and then by Month and Day (if hour is same)?
Read the thread again.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: Additional sort order by exif fields
Correctvukisz wrote: 2022-06-07, 11:49 UTC So there is no bug and I cannot sort by Hour, and then by Month and Day (if hour is same)?
Re: Additional sort order by exif fields
To be honest I did not understood that thread, because I was not aware of any custom column manipulations
Adding full [=exif.DateOriginal] and [=exif.Time] in front of DateM DateD and TimeH I finally understood. So it means, that even if it shows, that it is sorted by TimeH it is really sorted by full =exif.Time which could be on a different Month-day
Image: https://i.imgur.com/iRRONZS.png
Thanks for explanations!
P.S. If anyone interested I was doing hyperlapse photos over a few months and needed to delete night shoots. And "night shot" time is different between April and June
.
Resolved by just sorting by ISO. Those with high ISO were night shots which I needed to remove.
Adding full [=exif.DateOriginal] and [=exif.Time] in front of DateM DateD and TimeH I finally understood. So it means, that even if it shows, that it is sorted by TimeH it is really sorted by full =exif.Time which could be on a different Month-day
Image: https://i.imgur.com/iRRONZS.png
Thanks for explanations!

P.S. If anyone interested I was doing hyperlapse photos over a few months and needed to delete night shoots. And "night shot" time is different between April and June

Resolved by just sorting by ISO. Those with high ISO were night shots which I needed to remove.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Additional sort order by exif fields
Just let me give you a simple example:
[=exif.DateOriginal.M-D-Y]
This would be the EXIF date shown the American way, month-day-year. Now I can't just sort alphabetically, because otherwise the years would be sorted last. I can't sort numerically because there are 3 numbers, even with "minus" signs (or slashes if you prefer M/D/Y), and sorting number by number would also sort the year last.
[=exif.DateOriginal.M-D-Y]
This would be the EXIF date shown the American way, month-day-year. Now I can't just sort alphabetically, because otherwise the years would be sorted last. I can't sort numerically because there are 3 numbers, even with "minus" signs (or slashes if you prefer M/D/Y), and sorting number by number would also sort the year last.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Additional sort order by exif fields
Correct me if I am wrong, but I believe that this answer was intended to be in this thread: viewtopic.php?t=12478ghisler(Author) wrote: 2022-06-07, 15:07 UTC Just let me give you a simple example:
[=exif.DateOriginal.M-D-Y]
This would be the EXIF date shown the American way, month-day-year. Now I can't just sort alphabetically, because otherwise the years would be sorted last. I can't sort numerically because there are 3 numbers, even with "minus" signs (or slashes if you prefer M/D/Y), and sorting number by number would also sort the year last.

Re: Additional sort order by exif fields
An intermediate solution is to extract what you need using vbscript and WinScript Advanced content plugin
See a sample code to extract exif Original Date/Time elements and Digitalized Date/Time elements using WIA.ImageFile Object (Windows 7 and newest) You can find exif propertyID in decimal as Tag Dec.
This is just a Sample you can adapt to your needs. But do not go above 20 fields by script !
Scripts\exif.vbs
Option.ini
See a sample code to extract exif Original Date/Time elements and Digitalized Date/Time elements using WIA.ImageFile Object (Windows 7 and newest) You can find exif propertyID in decimal as Tag Dec.
This is just a Sample you can adapt to your needs. But do not go above 20 fields by script !
Scripts\exif.vbs
Code: Select all
Dim oImg
Set oImg = CreateObject("WIA.ImageFile")
Dim i
oImg.LoadFile(filename)
If ( oImg.Properties.Count > 0 ) Then
Dim fdow 'First Day of Week (0:Sunday,1:Monday...)
fdow = 0
'Dates are YYYY:MM:DD HH:mm:SS
Dim out
out = 0
For Each p In oImg.Properties
if ( p.PropertyID = 36867 )Then
content = p.value
content1 = MID(p.value,1,4)
content2 = MID(p.value,6,2)
content3 = MID(p.value,9,2)
content4 = MID(p.value,12,2)
content5 = MID(p.value,15,2)
content6 = MID(p.value,18,2)
content14 = Weekday(content1&"-"&content2&"-"&content3,fdow)
out = out+1
End If
if (p.PropertyID = 36868 )Then
content7 = p.value
content8 = MID(p.value,1,4)
content9 = MID(p.value,6,2)
content10 = MID(p.value,9,2)
content11 = MID(p.value,12,2)
content12 = MID(p.value,15,2)
content13 = MID(p.value,18,2)
content15 = Weekday(content8&"-"&content9&"-"&content10,fdow)
out = out + 1
End If
if (out = 2 ) then
Exit For
end if
Next
End If
Code: Select all
[Script]
ActiveScripts=xxif
[exif]
Script=Exif.vbs
content=exifDTOriginal
content1=exifDTOriginal-Y
content2=exifDTOriginal-M
content3=exifDTOriginal-D
content4=exifDTOriginal-Hour
content5=exifDTOriginal-Min
content6=exifDTOriginal-Sec
content7=exifDTDigitalized
content8=exifDTDigitalized-Y
content9=exifDTDigitalized-M
content10=exifDTDigitalized-D
content11=exifDTDigitalized-Hour
content12=exifDTDigitalized-min
content13=exifDTDigitalized-Sec
content14=exifDTOriginal-wd
content15=exifDTDigitalized-wd
extensions=jpg
FoldersPaths=0
Re: Additional sort order by exif fields
Christian,
Roman
Just let me give you a simple example:
[=exif.DateOriginal.M-D-Y]
This would be the EXIF date shown the American way, month-day-year. Now I can't just sort alphabetically
- You can try and use a nice piece of code in AHK to convert almost any date / time format to the AHK standard YYYYMMDDHH24MISS value. It is under public domain so you can either use it directly or for inspiration.
- You can use some regex with the appropriate delimiters to try and determine if it's a date in some format and treat and sort it as date. If it does not match the regex, treat it as a string.
- Support only numerical and string values and document that dates are not supported.
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Additional sort order by exif fields
1. I'm already sorting by date when the user uses a date field, so trying to detect a date from code wouldn't help here. The problem is that the user can combine parts of various fields with almost any complexity here, so I can't know by what I should sort.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com