Can't figure out how to use -tagsfromfile in Windows

Started by ShadowMaker SdR, October 26, 2013, 10:01:40 AM

Previous topic - Next topic

ShadowMaker SdR

Hi,

I am new to Exiftool and to be honest, I'm a bit overwhelmed by all the options that are available to me.
I have a situation that I think should pretty easy to do, but I can't figure it out.

I have used Digital Fusion (a compositing package similar to After Effects) to levelcorrect 800+ of my photos.
But Fusion doesn't keep the metadata while processing, so now I am left with 800+ perfectly balanced photos without metadata.
I rendered the leveled versions out from image1.jpg to image1_LVL.jpeg so that the base filename is the same and the extensions are different similar to the example from the documentation :

Quoteexiftool -tagsfromfile %d%f.CR2 -r -ext JPG dir
Recursively rewrite all JPG images in dir with information copied from the corresponding CR2 images in the same directories.

I figured that if I rewrote this as

exiftool -tagsfromfile %d%-4f.jpg -r -ext JPEG dir

that it would work, but it doesn't, so what am I missing here? Any help will be greatly appreciated.

Sander de Regt
The Netherlands

Phil Harvey

Hi Sander,

Quote from: ShadowMaker SdR on October 26, 2013, 10:01:40 AM
exiftool -tagsfromfile %d%-4f.jpg -r -ext JPEG dir

Very close, but you want to ignore 4 characters at the end.  %-4f takes the last 4 characters.  Adding a "." does what you want and ignores the last 4 characters instead:

exiftool -tagsfromfile %d%-.4f.jpg -r -ext jpeg DIR

And yes, these filename formatting strings are confusing.

I would also suggest adding -all:all after -tagsFromFile to preserve the original metadata locations since the source and target file formats are the same:

exiftool -tagsfromfile %d%-.4f.jpg -all:all -r -ext jpeg DIR

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ShadowMaker SdR

Hi Phil,

Thank you so much for this. You (and your tool) have just saved me hours and hours of work. I appreciate it very much.

Kind regards,

Sander de Regt