[Originally posted by shrubs111 on 2009-11-18 06:52:08-08]
I'd like to work through a batch of images and replace each individual existing description with the same text converted to all upper case - I've spent hours trawling through the excellent explanatory and help sections but I'm not sure its possible - I am using the standalone version under win XP and I originally thought it might be possible by exporting relevant data to a single file and then reading the uppercase data back in. But I dont think I can do that - does any know of a syntax I can use from command line to do this in one step? I feel it ought to be simple but I'm struggling.
[Originally posted by exiftool on 2009-11-18 11:15:11-08]Yes it is possible, but it requires a user-defined tag.
This config file will do what you want:
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
Upper => {
Require => 'Description',
ValueConv => 'uc($val)',
},
},
);
1; #end
and this command line:
exiftool "-description<upper" FILE
See the
config
file documentation for instructions on how to install the
config file.
- Phil
[Originally posted by shrubs111 on 2009-11-18 17:50:57-08]That's works brilliantly Phil, I used your template config file and added that bit of code at the end and in the command line substituted the directory path for 'FILE' and it works through the whole lot - in my case
exiftool "-description<upper" j:\test
Superb and many many thanks.
[Originally posted by shrubs111 on 2009-11-24 13:18:51-08]A further development which might be of use to someone else:
after much experimenting and having realised that some of the characters - apostrophe and umlauts etc were being interpreted badly when converted to CAPS and a re-read of the FAQs I realised it was better to take the uncorrupted ascii text in the exif ImageDescription tag and use this rather than the description tag and put this in the config file
so this is the command line to get the EXIF description of image file replaced by same text in uppercase
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
Upper => {
Require => 'ImageDescription',
ValueConv => 'uc($val)',
},
},
);
and command line then becomes
exiftool "-imagedescription<upper" j:\test
to do all the files in that DIR
then to get all the various versions of the captions to appear OK run from the command line:
exiftool "-iptc:Caption-Abstract<$EXIF:ImageDescription" j:\testdir
and once again
exiftool "-xmp:description<$EXIF:ImageDescription" j:\test
and that seems to set them all legible in photoshop etc
hope it works for you