Tag files from one directory if they occur in another

Started by frereroy, July 06, 2018, 01:42:08 PM

Previous topic - Next topic

frereroy

I have a directory that contains a list of 30 files that have been published on the web in low resolution. I have another directory of the full size images + many other "second choice" candidates.

I would like to add the XMP-xmp "Rating: 5" to all the files in the full size image directory only if they occur in the low resolution directory.

Am sure that Exiftool could sort this out but do not really know where to start.

TIA for any help and enlightenment.

Stephen Marsh

Are the filenames exactly the same or similar with a consistent naming pattern between the LR and HR images?

Is there a unique piece of metadata that matches between the LR and HR images?

Phil Harvey

You could do something like this if the file names are identical:

exiftool -if '-e "LOWRESDIR/$filename"' -xmp-xmp:rating=5 DIR

The above quoting is for Mac/Linux.  For Windows:

exiftool -if "-e qq(LOWRESDIR/$filename)" -xmp-xmp:rating=5 DIR

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

frereroy

Works great - many thanks.
Am wondering if there is any action that Exifttol CANNOT perform  ;)

Phil Harvey

I'm still having trouble getting it to wash the dishes for me.  :-\

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

"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