Can one use a moniker like *now*?

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

Previous topic - Next topic

Archive

[Originally posted by mixx on 2008-03-03 21:56:20-08]

I use ExifTool now for most everything. Would be nice if I could use -ModifyDate="now". Is there such a capability (planned)?

Thanxx, Mixx

Archive

[Originally posted by exiftool on 2008-03-04 12:47:30-08]

Hi Mixx,

No plans for this feature, but it would be possible to use the user-defined
tags to emulate this functionality, using the command

Code:
exiftool "-modifydate<now" FILE

and the following .ExifTool_config file:

Code:
%Image::ExifTool::UserDefined = (
    'Image::ExifTool::Composite' => {
        Now => {
            Require => 'FileName',
            ValueConv => q{
                my @tm = localtime;
                sprintf("%4d:%.2d:%.2d %.2d:%.2d:%.2d", $tm[5]+1900, $tm[4]+1,
                        $tm[3], $tm[2], $tm[1], $tm[0]);
            },
        },
    },
);
1;  #end

- Phil

Archive

[Originally posted by mixx on 2008-03-04 23:26:53-08]

Thanks, Phil,

good enough for me! Just what I wanted.

Thanxx, Mixx

PS: BTW, I do no see why you wouldn't put it into exiftool proper.

Archive

[Originally posted by exiftool on 2008-03-05 00:40:51-08]

Thanks for the suggestion, I'll think about this.

- Phil

Archive

[Originally posted by exiftool on 2008-04-05 10:50:13-07]

With exiftool 7.22 I added an Extra "Now" tag that can be
copied into a date/time tag with a command like this:

Code:
exiftool "-filemodifydate<now" image.jpg

- Phil