Filter Photos with a date range of the DateTimeOriginal

Started by irinaonline, May 08, 2017, 06:41:04 PM

Previous topic - Next topic

irinaonline

I try to figure out the syntax for setting a date range.

In the documentation I found a starting date, but could not figure out, how I can set an end date.

This is what I have:

exiftool "-FileName<DateTimeOriginal" -d "%%Y%%m%%d %%H%%M%%S 1SL3%%%%-c.%%%%ue" -ext jpg -ext mp4 -ext png -ext mov -if "$DateTimeOriginal ge '2001:04:01'" "D:\Users\Leo\Dropbox\ExifToolTest\- Preset 1S"

and would like to set as end date '2011-06-30'

And how could I bring the code "1SL3" in the format to the filename?


StarGeek

Try this as your if statement
-if "$DateTimeOriginal# ge '2001:04:01' and $DateTimeOriginal# le '2011:06:30'"

I added the hashmark at the end of DateTimeOriginal in order to compare to the original DateTimeOriginal value.  The use of the -d option changes the value of DateTimeOriginal.  For example, if your date was 2001:04:02..., your -d option will change it to 20010402 which will not be greater than or equal to 2001:04:01 because the colon has a higher compare value than the 0 character.

I'm not sure what you mean by bring the code 1SL3.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

irinaonline

thank you. that was fast.

i have to test the date range now with this new syntax.

with the code i simply mean to place a hardcoded text into the filename.