Find all photos where OffsetTime matches certain value

Started by newbie24, Today at 05:19:34 AM

Previous topic - Next topic

newbie24

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.

greybeard

The first one should work on Windows - the following works on a Mac:

exiftool -filename -offsettime -if '$OffsetTime ne "+01:00"' -r -T .

newbie24

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...

greybeard

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

newbie24

Tried it in cmd and... it works. This is really weird. At least now we know PowerShell was the problem.

Thanks for the help!