Author Topic: Copying selected tags between files  (Read 3608 times)

Jossie

  • Full Member
  • ***
  • Posts: 82
Copying selected tags between files
« on: August 14, 2013, 04:42:00 AM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16724
    • ExifTool Home Page
Re: Copying selected tags between files
« Reply #1 on: August 14, 2013, 07:28:20 AM »
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:

Code: [Select]
-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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Jossie

  • Full Member
  • ***
  • Posts: 82
Re: Copying selected tags between files
« Reply #2 on: August 14, 2013, 10:34:02 AM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16724
    • ExifTool Home Page
Re: Copying selected tags between files
« Reply #3 on: August 14, 2013, 10:48:24 AM »
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):

Code: [Select]
-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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Jossie

  • Full Member
  • ***
  • Posts: 82
Re: Copying selected tags between files
« Reply #4 on: August 14, 2013, 11:45:47 AM »
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

  • Full Member
  • ***
  • Posts: 82
Re: Copying selected tags between files
« Reply #5 on: February 19, 2014, 11:05:11 AM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16724
    • ExifTool Home Page
Re: Copying selected tags between files
« Reply #6 on: February 19, 2014, 11:12:07 AM »
Hi Hermann-Josef,

Quote
Now 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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Jossie

  • Full Member
  • ***
  • Posts: 82
Re: Copying selected tags between files
« Reply #7 on: April 08, 2014, 01:53:29 PM »
Good evening Phil,

thanks to your advice, I got the copying of tags to work in EXIFtoolGUI as follows with an args-file:
Code: [Select]
# 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