Image-ExifTool - Re: How to rename a file and move it to a different drive and directory

Posted on Mon Dec 17 21:44:49 2007 by exiftool in response to 6699 (See the whole thread of 8)
Re: How to rename a file and move it to a different drive and directory
You can solve your problems with 3 and 4 by setting the directory and filename together:

-d Q:/Photos/%Y_%m_%d/%Y-%m%d-%H%M%S -filename<${DateTimeOriginal}_${filenumber}%.8f%-2c.%ue

(note, I haven't tested this so there may be typos)

The alternative is to create a couple of user-defined tags to help you out: One (DateTime2) to give an unformatted date for copying to IPTC:DateCreated, and the other (Year) to extract the year from DateTimeOriginal for the Copyright tag. With these, you could get away with a single -d format, and everything could be accomplished in a single step.

%Image::ExifTool::UserDefined = ( 'Image::ExifTool::Composite' => { DateTime2 => { Require => 'DateTimeOriginal', ValueConv => '$val', }, Year => { Require => 'DateTimeOriginal', ValueConv => '$val=~s/:.*//; $val', }, }, );

- Phil
Direct Responses: 6701 | 6708 | Write a response