[Originally posted by exiftool on 2009-11-13 12:00:38-08]This won't work for a number of different reasons:
1) The proper date format string is '%Y'.
2) You can't assign a value to the
-d option.
3) You must put each argument on a separate line in the .args file.
4) Arguments must not be quoted in the .args file
Usually, the following .args file would be what you want:
-alldates-=74:00:00 00:00:00
to subtract 74 years from all date/time values. However, this won't
currently work because exiftool currently implements date/time
shifting using posix library functions which are limited to the range
1970 to 2034. So I'm afraid that you will likely get an error when trying
to shift dates outside this range. I don't like the limitations of the
posix library, so it is on my list to fix this, but I haven't got around
to it yet.
Currently the only alternative is to resort to user-defined tags,
and you can do what you want with this config file:
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
FixOriginal => {
Require => 'DateTimeOriginal',
ValueConv => '$val=~s/2077/2003/ ? $val : undef',
},
FixCreate => {
Require => 'CreateDate',
ValueConv => '$val=~s/2077/2003/ ? $val : undef',
},
FixModify => {
Require => 'ModifyDate',
ValueConv => '$val=~s/2077/2003/ ? $val : undef',
},
},
);
1; #end
and this .args file:
-datetimeoriginal<fixoriginal
-createdate<fixcreate
-modifydate<fixmodify
This will change only images with the year 2077, and leave all other images
unchanged.
See the
config
file documentation for instructions on how to install the config file.
- Phil