ExifTool Forum

ExifTool => Archives => Topic started by: Archive on May 12, 2010, 08:54:35 AM

Title: IPTC:DateCreated
Post by: Archive on May 12, 2010, 08:54:35 AM
[Originally posted by loloeroket on 2009-05-13 18:43:12-07]

Hi Phil,

I am trying to set IPTC created date automatically in a template file and after many attempts and forum searches couldn't find the correct answer. The thing is I am not getting any error but the result does nothing. Here is the code I am using. I use the latest 7.75 on MacOS X 10.5.

Code:
-d
%Y:%m:%d
-IPTC:DateCreated<$FileModifyDate

What am I doing wrong?

Thanks

Laurent
Title: Re: IPTC:DateCreated
Post by: Archive on May 12, 2010, 08:54:35 AM
[Originally posted by exiftool on 2009-05-13 18:52:42-07]

Hi Laurent,

I don't understand why this doesn' work for you.
It works fine for me:

Code:
> cat t1
-d
%Y:%m:%d
-IPTC:DateCreated<$FileModifyDate

> exiftool a.jpg -@ t1 -v2
======== a.jpg
Setting new values from a.jpg
Writing IPTC:DateCreated
Rewriting a.jpg...
  Editing tags in: APP13 IPTC Photoshop
  Creating tags in: APP13 IPTC Photoshop
JPEG APP1 (45048 bytes):
Creating APP13:
  Creating Photoshop
  Creating IPTC
    + IPTC:DateCreated = '20090513'
    + IPTC:ApplicationRecordVersion = '4' (mandatory)
JPEG DQT (130 bytes):
JPEG SOF0:
JPEG DHT (416 bytes):
JPEG SOS
    1 image files updated

> exiftool a.jpg -iptc:datecreated -filemodifydate
Date Created                    : 2009:05:13
File Modification Date/Time     : 2009:05:13 15:14:07-04:00

Try adding a -v2 option to see if it gives any clue
about what is going wrong.

- Phil
Title: Re: IPTC:DateCreated
Post by: Archive on May 12, 2010, 08:54:35 AM
[Originally posted by loloeroket on 2009-05-13 19:05:35-07]

i Phil,

I found the problem. Just asking the question was enough to help. Actually in order to be concise I just isolated the template to the single value but my template was:

Code:
-d
%Y:%m:%d
-IPTC:DateCreated<$FileModifyDate
-d
%B %d, %Y
-IPTC:Caption-Abstract<blahblh blab$/$FileModifyDate

but when I do this instead it works!
Code:
-d
%B %d, %Y
-IPTC:Caption-Abstract<blahblh blab$/$FileModifyDate
-d
%Y:%m:%d
-IPTC:DateCreated<$FileModifyDate

It seems that matters. It is now working in a different order.

Thanks,

Laurent
Title: Re: IPTC:DateCreated
Post by: Archive on May 12, 2010, 08:54:35 AM
[Originally posted by exiftool on 2009-05-14 00:15:58-07]

Hi Laurent,

Ah, yes.  This is the problem.  Only one -d option is
possible.  The last one takes precedence.  So you can't set two different
tags with two date/time formats unless you do some custom
manipulations with a user-defined Composite tag.

- Phil
Title: Re: IPTC:DateCreated
Post by: Archive on May 12, 2010, 08:54:35 AM
[Originally posted by loloeroket on 2009-05-14 01:29:07-07]

Hi Phil,

I used the exiftool_config provided by gordong with $MyYear, $MyMonth, $MyMonth2 and $MyDay. Its works perfectly!! Such a great piece of software!!

Thanks a lot,

Laurent