I have two commands, work great.
exiftool -r -overwrite_original -Comment"<BaseName" /Volumes/Media
exiftool -r -overwrite_original -Title"<BaseName" /Volumes/Media
But I would like them to work "IF and Only IF" the title and or comment is DIFFERENT from BaseName. I'd like to run this semi regularly, but don't want to go through all the trouble if its already been done once.
is that possible?
is it also possible to merge the two commands into one?
Thanks!
This should do it:
exiftool -r -overwrite_original -Comment"<BaseName" -Title"<BaseName" -if "not $comment or not $title or $comment ne $basename or $title ne $basename" /Volumes/Media
- Phil
Quote from: Phil Harvey on November 05, 2022, 09:13:11 PMexiftool -r -overwrite_original -Comment"<BaseName" -Title"<BaseName" -if "not $comment or not $title or $comment ne $basename or $title ne $basename" /Volumes/Media
That doesn't appear to work. I am testing it on a single directory.. relevant metadata is:
ExifTool Version Number : 12.42
File Name : Violin Rehersal (2022).mp4
Directory : .
Comment : Violin Rehersal (2022).mp4
XMP Toolkit : Image::ExifTool 12.42
Title : Violin Rehersal (2022).mp4
when I run
Quoteexiftool -r -overwrite_original -Comment"<BaseName" -Title"<BaseName" -if "not $comment or not $title or $comment ne $basename or $title ne $basename" ./
I get
1 directories scanned
1 files failed condition
0 image files read
The file exist as:
Violin Rehersal (2022).mp4
What O/S are you using? Did you read my signature?
- Phil
Quote from: Phil Harvey on November 06, 2022, 09:05:16 PMWhat O/S are you using? Did you read my signature?
- Phil
Of course, that fixed it!
thanks
Is there a log? or a way to see which failed the condition? more verbose output?
1010 directories scanned
17 files failed condition
0 image files read
Take a look at the -progress option (https://exiftool.org/exiftool_pod.html#progress-:-TITLE) or the -v (-verbose) option (https://exiftool.org/exiftool_pod.html#v-NUM--verbose).
Hi Wesley,
To get a log of all files that failed the condition, you can use the -efile4 option, like this:
exiftool -efile4 log.txt ...
Read the -efile option documentation for more details.
- Phil