Tag "createdate" not defined

Started by real_john_doe, November 06, 2020, 09:38:44 PM

Previous topic - Next topic

real_john_doe

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?

Phil Harvey

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
...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 ($).

real_john_doe

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?

StarGeek

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 to your command.
* 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).

Phil Harvey

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
...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 ($).