ExifTool Forum

ExifTool => Newbies => Topic started by: real_john_doe on November 06, 2020, 09:38:44 PM

Title: Tag "createdate" not defined
Post by: real_john_doe on November 06, 2020, 09:38:44 PM
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?
Title: Re: Tag "createdate" not defined
Post by: Phil Harvey on November 06, 2020, 09:58:50 PM
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
Title: Re: Tag "createdate" not defined
Post by: real_john_doe on November 07, 2020, 07:38:22 AM
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?
Title: Re: Tag "createdate" not defined
Post by: StarGeek on November 07, 2020, 11:16:38 AM
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.
Title: Re: Tag "createdate" not defined
Post by: Phil Harvey on November 07, 2020, 11:53:52 AM
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
Title: Re: Tag "createdate" not defined
Post by: real_john_doe on November 07, 2020, 12:56:37 PM
Thank you guys.