In a given directory tree, I've got:
- several .MOV files as the source files
- for each .MOV a corresponding .JPG that already exists as destination file. Filename is same, just extension differs.
- several additional .JPG files that have nothing to with the above
What I want to do is:
a) Copy tags from each MOV to its corresponding JPG.
b) Ignore all JPG that are not related to a MOV.
What I've tried so far is:
-r
-ext
.JPG
-tagsfromfile
%d%f.MOV
-DateTimeOriginal<ContentCreateDate
This works fine for a)
But it throws an error message for each b). ("Warning: Error opening file"). Which is no surprise, because this JPG does not correlate with a MOV.
Question: Is there any conditional processing that fulfills "process only .JPG where a .MOV of same name exists"? As the JPGs without corresponding MOV by far outnumbers the related ones, just ignoring the error message is not very elegant as there will be hundreds of errors per one expected success.
What I also played around with as alternate option was based on
-ext
.MOV
-o
%d%f.JPG
This correctly comes from processing the list of MOV files and only tries to touch JPG that are related to a MOV. However, seems this in general is not designed to copy tags to a JPG file...?
Try this:
-r
-ext
mov
-tagsfromfile
@
-DateTimeOriginal<ContentCreateDate
-srcfile
%d%f.JPG
This uses the advanced (and somewhat confusing) -srcfile option to process files different than those named on the command line.
- Phil
Great, that works as intended. Now I finally understand the -srcfile option - after having read it tens of times in the doc leaving me confused :-[
Maybe it would make sense to add this specific example in the doc here? I think this could help a lot...
Thanks a lot!
-Uwe
Good point. I'll add an example to the -srcfile documentation.
- Phil