Copying selected tags between files

Started by Jossie, August 14, 2013, 04:42:00 AM

Previous topic - Next topic

Jossie

Good morning,

it is certainly possible to copy selected tags from one file to another, but I do not know how to do this.

Background: I scan my slides with SilverFast into the raw format (TIF). The raw data are to be tagged with EXIFtoolGUI for archiving. Then I plan to process the raw data (dust removal, colour adjustment, reducing resolution if necessary) and convert them into JPG-format, saving these in a separate directory (same file name but different extension).

Unfortunately the SilverFast software I use for the image processing does not copy the metadata from the raw file to the JPG. So I am looking for a simple way to write an args-file for the GUI to copy the metadata I had entered. I know, that there is the command "Export/Import -- copy metadata from a single file" but this copies everything overwriting things that have changed like the resolution.

Any hint on how to accomplish this would be very welcome.

Many thanks in advance and best wishes

Hermann-Josef

Phil Harvey

Hi Hermann-Josef

You're talking about ExifToolGUI?  You'll have to figure out how to use an argfile there (probably the "ExifTool direct" feature).  The argfile should look something like this:

-tagsfromfile
@
-TAG1
-TAG2
-TAG3
...


Where TAG1, TAG2, TAG3, etc are the names of the tags that you want to copy.

- 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 ($).

Jossie

Hi Phil,

thank you for your immediate reply!

Reading your answer it occured to me that the args-file and the ExifTool direct feature work - as far as I understand it - only for the selected file(s) and then filewise. My problem is that I want to copy the tags from one file in the current directory to another file in another directory.

Probably something like this is not foreseen in the GUI.

Regards

Hermann-Josef

Phil Harvey

Hi Hermann-Josef,

Right.  Between 2 files.  All you need to do is modify the "@" to get you from one file to another.  Something like this (assuming the files have the same name):

-tagsfromfile
%d../OTHER_DIRECTORY/%f.%e


See the -tagsFromFile option in the application documentation for complete details.

- 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 ($).

Jossie

Hi Phil,

thanks for pointing out this part of the documentation. I guess this will work out once I have gone through the examples.

Best wishes

Hermann-Josef

Jossie

Hi Phil,

after quite some time I have to come back to this topic with two specific questions:

In an args-file the name of the current image is contained in variable $file, which also holds the extension. Now I want to copy tags from a tif-image to a jpg-image. Could you please tell me, how to change the extension in the variable $file from tif to jpg?

Since both file names have to be used in a single command line, I assume I have to create a new variable, like $file2, which holds the full name of the jpg-image (a copy of $file with extension substituted). How do I create such a new variable?

Many thanks in advance and best wishes

Hermann-Josef

Phil Harvey

Hi Hermann-Josef,

QuoteNow I want to copy tags from a tif-image to a jpg-image.

Just substitute the extension of the source file instead of "%e" in my last example. (ie. change "%e" to "tif")

- 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 ($).

Jossie

Good evening Phil,

thanks to your advice, I got the copying of tags to work in EXIFtoolGUI as follows with an args-file:

# Copies tags to the selected file(s) from the reference as specified in line 2
#
-tagsfromfile
G:\Bildarchiv\Scans\SW_Negative/%f.tif
-EXIF:Artist
-GPS:GPSLatitudeRef
-GPS:GPSLongitudeRef
-GPS:GPSLatitude
-GPS:GPSLongitude


This is a big step forward for my Image archive!

Thanks a lot for all the work you did and your advice here in the forum.

Hermann-Josef