I am trying to write a shell script for Hazel that adds copyright information "Copyright YYYY Name" to the metadata automatically. I have read many threads, but somehow it does not work for me.
Some information:
Operating System: MacOS
Code:
exiftool -overwrite_original -copyright'<Copyright $createdate Name' -d %Y *.png
Output:
Warning: [minor] Tag 'createdate' not defined
I can add the copyright line to the metadata if I use this code:
exiftool -overwrite_original -copyright="Copyright $createdate Name" -d %Y *.png
But $createdate is printed as $createdate.
The creation date itself, however, is overwritten and assigned "today" as the creation date.
Can you help me please to make it work?
Run exiftool -s -time:all FILE to see what date/time tags are available, and use one of those instead of CreateDate in your command.
- Phil
Hi Phil,
thank you for your quick reply and for this great tool.
Question 1:
Which are close to CreateDate are ProfileDateTime and MetadataDate. CreatDate is actually missing. But how can this be explained? The MacOS Finder shows a creation date for this file.
Question2:
As soon as I modify the file, a new creation date is displayed. Is there a way to add the copyright information without changing the creation date?
Quote from: real_john_doe on November 07, 2020, 07:38:22 AM
Question 1:
Which are close to CreateDate are ProfileDateTime and MetadataDate. CreatDate is actually missing. But how can this be explained? The MacOS Finder shows a creation date for this file.
The timestamp that Finder is showing is probably the file system timestamp,
FileModifyDate or
FileCreateDate. Since you're dealing with PNG files, you should know that they don't have very much metadata support in most programs, including operating systems.
QuoteQuestion2:
As soon as I modify the file, a new creation date is displayed. Is there a way to add the copyright information without changing the creation date?
It sounds like Finder is reading the
FileModifyDate then. Add the
-P (
-preserve) option (https://exiftool.org/exiftool_pod.html#P--preserve) to your command.
On Mac, -P will preserve the system FileModifyDate. To preserve the system FileCreateDate on Mac, you must use the -overwrite_original_in_place option.
- Phil
Thank you guys.