DateTimeOriginal to DateCreated and TimeCreated?

Started by Archive, May 12, 2010, 08:54:19 AM

Previous topic - Next topic

Archive

[Originally posted by philipgoddard on 2008-04-10 20:30:52-07]

I'm experimenting with the Windows executable of Exiftool to see if it can correct a whole lot of way-out IPTC DateCreated and TimeCreated values (with year mostly at 2115!) which some rogue program put in there in my quite large photo collection.  I came up with the following command line parameters:

-r -o h:\cmphotos-new -P "-DateTimeOriginal<DateCreated"

This worked beautifully on a test copy of my photo collection, to correct all the DateCreated fields, but naturally left all the TimeCreated fields still screwy.  Is there a way that I could amend my command line so that a substring of DateTimeOriginal could be used, so that I could write specifically the date part of DateTimeOriginal to DateCreated and the time part of DateTimeOriginal to TimeCreated?  I thought I'd read somewhere initially that substrings of tag values could be extracted, but when I wanted to do that just now I couldn't find any reference to such a facility.

As I say, I'm using the Windows executable of Exiftool and have no plans at present to get into the Perl code.

Many thanks,
http://www.clear-mind-photos.com" target="_blank">Philip Goddard

Archive

[Originally posted by exiftool on 2008-04-11 10:54:29-07]

Hi Philip,

I think you got a < instead of a > in your command, because
from your text it seems you are setting datecreated, right?

If so, you can set timecreated in exactly the same way.  Exiftool
will magically suck the time from a date/time value when writing
to IPTC:TimeCreated.

The only way to do substrings would be to create a user-defined
composite tag, but that isn't necessary here.

- Phil

Archive

[Originally posted by philipgoddard on 2008-04-11 14:46:49-07]

Many thanks for that, Phil.

Really neat, and it works!  Brilliant!

Kind regards,

http://www.clear-mind-photos.com" target="_blank">Philip Goddard