How to compare src/dest files modification timestamps before doing tagsfromfile?

Started by WarriorOne, June 11, 2014, 08:26:02 PM

Previous topic - Next topic

WarriorOne

I need to copy tags from one set of files to another set of files, but only copy tags IF the source file modification Date/Time is newer than then the destination file modification Date/Time.

I'm currently using external batch script to compare modification times and then calls exiftool with -tagsfromfile srcfile destfile. I'm wondering if it's possible to compare file modification timestamps directly in Exiftool without external scripting? Somewhere along this lines: -if "$srcfile:FileModifyDate > $destfile:FileModifyDate" -tagsfromfile srcfile destfile. Is something like this possible?

Thanks!

Phil Harvey

Unfortunately the -if option has access to only the tags from the target file.  So you will need to do this externally somehow.

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