Image-ExifTool - Re: Date Shift fails with MakerNotes error

Posted on Thu Jan 31 16:25:20 2008 by mixx in response to 6975 (See the whole thread of 10)
Re: Date Shift fails with MakerNotes error
Phil,

I am not an expert but suggestion 1 is just another problem of how to pass arguments to an application and could be solved by quoting rules maybe -tag1="$tag2" would do the value and -tag1="'$tag2'" the string. I do not know if this works, but would not be anything unusual.

About string manipulation: exiftool gets a string as an argument anyway as in
exiftool "-example_date=$datetimeoriginal" a.jpg
(using the "new" syntax :-)). What's wrong with
exiftool "-example_date=substring($datetimeoriginal,1,10)" a.jpg
to assign the first 10 characters of the DateTimeOriginal flag to example_date? And if that should use a different notation one could
exiftool "-example_date=replace(substring($datetimeoriginal,1,10),':','/'))" a.jpg
to get e.g. "2008/01/31" into example_date.

Just a thought, Mixx

Direct Responses: 6977 | Write a response