ExifTool Forum

ExifTool => Newbies => Topic started by: minime on December 04, 2021, 10:19:34 AM

Title: Finding photo with same date and add tags
Post by: minime on December 04, 2021, 10:19:34 AM
Hello everyone,

First of all, pardon me if my question got answered before, I tried to find an answer, but was not successful.

Challenge
For pictures in a specific folder I would like to add the tag "to_be_checked" and all the tags it finds on the first matched photo with the same date (not date/time) of the "DateTimeOriginal" in another specific folder. This would help me to import quickly many pictures to an already existing structured photo archive. I am aware that the "first match on date only" approach could lead to false tagging, hence the "to_be_checked" tag.

Example

File to get updated
Path and name: /folder_a/2021-12-04_123112.jpg
Tags: None

First Matched file
Path and name: /folder_b/2021-12-04_011120.jpg
Tags: USA; Sedona

Result
Path and name: /folder_a/2021-12-04_123112.jpg
Tags: USA; Sedona; to_be_checked

and then process the next file. Ideally, files that are already tagged in folder_a should not be processed.

Any idea how this could be done?
Title: Re: Finding photo with same date and add tags
Post by: StarGeek on December 05, 2021, 12:09:12 PM
I can't think of a way to do this without some external scripting.

The best I can think of is to run exiftool once to extract the date from the files you want to check and use the -p (-printFormat) option (https://exiftool.org/exiftool_pod.html#p-FMTFILE-or-STR--printFormat) to create a BAT/bash script file with the exiftool commands to do the copying.
Title: Re: Finding photo with same date and add tags
Post by: minime on December 05, 2021, 12:20:49 PM
 :'( too bad, I was hoping for some magic here  8)

Thank you very much for taking the time to read my post and to think about the problem. Much appreciated!