Command-line batch process

Started by Archive, May 12, 2010, 08:53:51 AM

Previous topic - Next topic

Archive

[Originally posted by ed on 2005-10-10 09:53:27-07]

I'm sorry if I am missing the obvious here. I have a directory containing a number of .CR2 files, and a number of .jpg files of the same name (eg IMG_0096.CR2 and IMG_0096.jpg). What I want is a command that will copy the exif data from all the .CR2 files to the corresponding .jpg files, but I can't work out what the syntax should be.

Thanks
Ed

Archive

[Originally posted by exiftool on 2005-10-10 15:06:18-07]

Hi Ed,

You weren't missing anything obvious, this wasn't possible with ExifTool 5.65.

But I have just released version 5.66 in which this ability has been added.  With this version, you can use %d, %f and %e in the filename for the -tagsfromfile option in a similar way to the -w option.  This allows you to do what you want with a command line like this:

Code:
   exiftool -tagsfromfile %d%f.CR2 -ext jpg DIR

where DIR is the name of the directory containing the files.  This command will rewrite all 'jpg' images, copying information from the corresponding 'CR2' images.

You can also throw in a -r option to recurse into subdirectories if you want.

Archive

[Originally posted by ed on 2005-10-10 19:09:42-07]

Many thanks Phil. I'll get the latest version.

BTW, I think exiftool is great. And with many image programs choosing to ignore exif data when reading/writing files, I find it essential. Ed

Archive

[Originally posted by ed on 2005-10-10 20:08:56-07]

Works perfectly. Brilliant. Many thanks. Ed