Hi,
I'm trying to find all the photos taken in 2022, so I use this command:
exiftool.exe if "$DateTimeOriginal > '2022:01:01'" -T -FileName -DateTimeOriginal <folder>
But I get back, which I do not expect:
6f1f5946-0f3f-4bc7-bbdf-35b3f4f28812.jpg 2019:12:27 08:22:43
77F135B4-4DA2-416E-B4A4-08C75D6259FA.jpg 2019:11:05 20:39:02
79461fdc-6379-46a9-bcbd-f9162189ba45.jpg 2022:11:27 23:30:26
7D26FBDB-4736-4EBC-BEB6-D19F31508DAD.jpg 2019:10:22 17:55:10
What am I doing wrong?
Next step is to copy the files to another location...
">" is for numerical comparisons, but "2022:01:01" is not a number. Use the string comparison "gt" operator instead.
- Phil
Unfortunately, the same result with:
exiftool.exe if "$DateTimeOriginal gt '2022:01:01'" -T -FileName -DateTimeOriginal <folder>
version 12.53
It was the missing dash(-) in front of the 'if' statement. Below works!
exiftool.exe -if "$DateTimeOriginal gt '2022:01:01'" -T -FileName -DateTimeOriginal <folder>
You should have also seen this error then:
Error: File not found - if
- Phil
To choose the dates you wish to sort by, drag down the column.