[solved] Date in Copyright

Started by deheme, November 20, 2015, 01:54:32 PM

Previous topic - Next topic

deheme

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

Phil Harvey

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 btw)

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

deheme

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


StarGeek

You need to double percent signs in a batch file.

Try
exiftool.exe %1 -d %%Y "-IPTC:CopyrightNotice<$DateTimeOriginal" -k
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

deheme

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

deheme

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