Hi,
I would like to find a way to find all photos where OffsetTime does not equal +01:00. I tried with:
exiftool -filename -OffsetTime -if "$OffsetTime ne '+01:00'" -r -T .
exiftool -filename -OffsetTime -if "$OffsetTime ne +01:00" -r -T .
exiftool -filename -OffsetTime -if "$OffsetTime ne '1'" -r -T .
exiftool -filename -OffsetTime -if "$OffsetTime ne 1" -r -T .
But none of these find the photos with different OffsetTimes. What am I missing?
I apologize if the question has already been asked, but I did not find the answer on the forum.
The first one should work on Windows - the following works on a Mac:
exiftool -filename -offsettime -if '$OffsetTime ne "+01:00"' -r -T .
I am on Windows, using PowerShell. None of the commands work. I've run these for you to see (this is just my testing environment):
PS F:\Photos> exiftool -filename -offsettime -T .
file1.jpg +01:00
file2.jpg +01:00
file3.jpg +02:00
file4.jpg +02:00
file5.jpg +02:00
file6.jpg +02:00
PS F:\Photos> exiftool -filename -OffsetTime -if "$OffsetTime ne '+01:00'" -r -T .
PS F:\Photos>
Is there something obvious I'm missing? It just seems so easy...
Maybe try this and see if there are duplicates:
exiftool -a -G1 -filename -offsettime .
although it should still work - I'm out of ideas - as you say it does just seem easy but I don't use Powershell - perhaps try it in a normal command window
Tried it in cmd and... it works. This is really weird. At least now we know PowerShell was the problem.
Thanks for the help!
Quote from: newbie24 on November 21, 2024, 10:49:47 AMThis is really weird. At least now we know PowerShell was the problem.
You have to pay attention to the highlighting in Powershell (https://exiftool.org/forum/index.php?msg=80581). And sometimes even that isn't enough as shown in that post. PS's quoting rules are different from every other command line.
Which is why I always recommend you use CMD instead of PS.