ExifTool Forum

ExifTool => Newbies => Topic started by: deheme on November 20, 2015, 01:54:32 PM

Title: [solved] Date in Copyright
Post by: deheme on November 20, 2015, 01:54:32 PM
Hello,
Many thanks for exiftools and all the documentation around it.

May be I'm completely blind but I cannot find the way to inject the created date of a jpeg into the copyright text.
I tried :
exiftool.exe %1  -IPTC:CopyrightNotice="${DateTimeOriginal}"  -k
exiftool.exe %1  -IPTC:CopyrightNotice="$DateTimeOriginal"  -k
exiftool.exe %1  -d %Y -IPTC:CopyrightNotice="$DateTimeOriginal"  -k

None of these works as I would like (to insert the create date - only the year by the way).
This command is in a .bat file running under windows 10.
Any hint?

Thanks
DéHème
Sorry for my FrenGlish
Title: Re: Date in Copyright
Post by: Phil Harvey on November 20, 2015, 01:59:51 PM
Hi DéHème,

This is an easy mistake to make.  Use "<" instead of "=" when copying values from other tags.

exiftool.exe %1 -d %Y "-IPTC:CopyrightNotice<$DateTimeOriginal" -k

(this is common mistake number 5.3 (https://exiftool.org/mistakes.html#M5) btw)

- Phil
Title: Re: Date in Copyright
Post by: deheme on November 20, 2015, 02:12:25 PM
Thank you Phil for such a quick answer.

exiftool.exe %1 "-IPTC:CopyrightNotice<$DateTimeOriginal" -k
works perfect, but when I try to extract only the year :
exiftool.exe %1 -d %Y "-IPTC:CopyrightNotice<$DateTimeOriginal" -k
It doesn't work.

DéHème

Title: Re: Date in Copyright
Post by: StarGeek on November 20, 2015, 02:24:58 PM
You need to double percent signs in a batch file (https://support.microsoft.com/en-us/kb/75634).

Try
exiftool.exe %1 -d %%Y "-IPTC:CopyrightNotice<$DateTimeOriginal" -k
Title: Re: Date in Copyright
Post by: deheme on November 20, 2015, 02:31:06 PM
I did try the double % but the cmd window closes despite the -k (I cannot see what happens) and the field is not modified.

Déhème
Title: Re: Date in Copyright
Post by: deheme on November 20, 2015, 02:53:10 PM
Quote from: deheme on November 20, 2015, 02:31:06 PM
I did try the double % but the cmd window closes despite the -k (I cannot see what happens) and the field is not modified.

Sorry, IT WORKS indead...

Thanks a lot for the time spent
DéHème