Multiple use of Date Format in an argfile

Started by Matthias Juergens, December 03, 2019, 06:30:08 PM

Previous topic - Next topic

Matthias Juergens

Dear Harvey,
I love this tool! Thank you so much!

The following code works flawlessly.

exiftool -@ argfile -k

argfile:
-artist=Matthias Juergens
-FileName<${DateTimeOriginal}_${ModelShort}%-4f.%e
-d
F:\ORIGINAL.PHOTORECORDING\PHOTO.%Y\%Y%m%d-DE-/%Y%m%d_%H%M%S
D:\

this makes the following structure e.g.:

F:\ORIGINAL.PHOTORECORDING\PHOTO.2019\20190406-DE-/20190406_194513_ND3467.JPG

But, now I want to include the copyright section.
if I use something like
-copyright<©$createdate

the primarily defined "F:\FOR_SYNCHRON\ORIGINAL.PHOTORECORDING\PHOTO.%Y\%Y%m%d-DE-/%Y%m%d_%H%M%S" is written to the copyright tag.
That is correct but not that what I want.

Is there a way to set the copyright to
e.g. 2019 (year of createdate)

I fear that there are two definitions of the Date Format neccessary, but this is not possible, I think.

Best regards,
Matthias Juergens

StarGeek

What you want to use is the DateFmt helper function.  With it you can set a different date format for each tag.  You need to include the hashtag after the tag name (see the -n (printConv) option) because otherwise the -d (dateFormat) option will override it. For your copyright line use

-copyright<©${CreateDate#;DateFmt('%Y')}
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Matthias Juergens

Hallo StarGeek,
:) :) :) :) :) :) :) :) :) :) Thank you so much. Works flawlessly!

Best regards,
Matthias