copy exif data between raw+jpeg

Started by etienne, March 06, 2021, 07:35:25 AM

Previous topic - Next topic

etienne

Hello,
we work in raw+jpeg.
Our current workflow is based on color labels and notes common between Adobe Bridge and Lightroom.
My problematic is the following. If I tag a jpeg photo in Bridge with a color, importing the raw+jpeg into LR does not work for me because the raw takes over and does not have the required color tag.
Same if I choose in the LR preferences that the jpeg and the raw are considered as separate files, this would force me to retype the corresponding raw photos.
Can you help me to make exiftool automatically copy the exifs of the jpegs to their raw counterparts (which are located in the same folder)?
I specify that I have no notion in code.
Can I do it alone? If not, who can I turn to?
Thanks a lot.

Phil Harvey

The first thing to do is to determine what tag you want to copy.  For this, run exiftool -s FILE on a file containing the tag you want to copy.

Once you know the tag name, use this command to copy it from the JPEG to the RAW:

exiftool -tagsfromfile %d%f.JPG -TAG --ext jpg DIR

where TAG is the name of the tag you want to copy, and DIR is the directory containing the raw and jpg files.  You can add as many -TAG options as you want to copy more than one tag.

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

StarGeek

A quick test with Bridge seems to indicate that the color label is XMP:Label, so replacing -TAG in Phil's example with -XMP:Label should copy that.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

etienne

Thank you for your answers. It's all very exciting, but beyond my capabilities. Could you point me to a professional who could code this for me remotely?
I would also have a script to create folders with metadata functions to have done.
Thank you for your help.

StarGeek

Try this.  Drag exiftool onto the desktop.  Rename it to the following
exiftool(-P -overwrite_original -tagsfromfile %d%f.JPG -Label --ext jpg -k)

Drag the files/directories onto this new exiftool.  Drag a test RAW file onto the icon, one that has a matching jpg.  That should update the RAW file.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

etienne

the only thing I understand is that you ask me to create a shortcut executing exiftool on the desktop.
In reality I won't be able to do that.  :-\
Can you point me to someone who could do it for me and my other requests?  ;)


Phil Harvey

You'll have to do this yourself.  StarGeek was not suggesting creating a shortcut, he was suggesting renaming "exiftool(-k).exe" (which you would see as "exiftool(-k)" if extensions are hidden).  Just download the Windows zip file (click here), click on it to open it, then drag "exiftool(-k)" to your desktop and rename it as StarGeek suggested.  Then drag/drop raw files or folders onto it.  Simple.

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

etienne

ok, pareil sur Mac ?
Il s'agit de l'Exécutable Unix appelé exiftool situé HDD/usr/local/bin/exiftool ?

Phil Harvey

I don't speak French well, so I'll answer in English:

Sorry, those instructions were for Windows.

If you are on Mac, download and install this version.  (Hopefully you're not running Big Sur, because this may complicate things.)

Then open a Terminal window (from Applications/Utilities folder), and type this (do not press RETURN):

exiftool -P -overwrite_original -tagsfromfile %d%f.JPG -Label --ext jpg

then press SPACE.

Then drag and drop the raw files/folders onto the Terminal window.

Finally, press RETURN in the Terminal window to run ExifTool.

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

etienne

No problem. After placing a raw and a jpeg in a test folder. I tagged the jpg via Bridge. Then I slipped the raw into the terminal window. Here is what it shows me.

Last login: Sat Mar  6 20:08:45 on ttys001
iMac-de-IMAC8:~ imac8$ exiftool -P -overwrite_original -tagsfromfile% d% f.JPG -Label --ext jpg /Users/imac8/Desktop/TEST\ RAWS/JON_0223.tiff
Invalid TAG name: "tagsfromfile%"
Error: File not found - d%
Error: File not found - f.JPG
======== /Users/imac8/Desktop/TEST RAWS/JON_0223.tiff
Warning: Invalid tag name 'tagsfromfile%' - /Users/imac8/Desktop/TEST RAWS/JON_0223.tiff
    1 image files read
    1 files could not be read
iMac-de-IMAC8:~ imac8$

StarGeek

Quote from: etienne on March 06, 2021, 02:14:42 PM
iMac-de-IMAC8:~ imac8$ exiftool -P -overwrite_original -tagsfromfile% d% f.JPG -Label --ext jpg /Users/imac8/Desktop/TEST\ RAWS/JON_0223.tiff

You copied the command incorrectly.  Space before the percent sign, and no spaces between the percent sign and the d/f.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

etienne

oops, it's the Chrome translator that modified the spaces...
Great, it works.
Just: How can I copy all the metadata written in the jpeg instead of the tag only? (star rating and keywords for example)

I have an another question.
I want exiftool to automatically copy modified raws to a folder specifically created from a keyword.

Example I have a folder containing the following images :
IMG_0001.JPG
IMG_0001.tiff
IMG_0002.JPG
IMG_0002.tiff
IMG_0003.JPG
IMG_0003.tiff
In Adobe Bridge, I mark with a colored label and assign the keyword "NAME" to the image IMG_0001.JPG and to the image IMG_0003.JPG.
I want the images IMG_0001.tiff and IMG_0003.tiff to be copied (with metadata from the jpeg) to a "NAME" folder in a specific location outside the folder containing the images.
I specify that the "NAME" folder must be created by Exiftool and not manually.
Is this possible?

Phil Harvey

This is a duplicate post.  Read here for responses.

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