Add tag and copy data from source

Started by lavAzza, August 04, 2020, 09:32:49 AM

Previous topic - Next topic

lavAzza

Hello.
I thought I could handle this simple task, but I couldn't.(

I need to copy GPS coordinates from jpg files to another jpg files.
I try to
exiftool -tagsfromfile %%d%%f.jpg "-all:all>all:all" -overwrite_original -ext jpg .\change\
but it is not work. As I understand because target file have no this tags.
Source file have data:
GPS Version ID                  : 2.2.0.0
GPS Latitude Ref                : North
GPS Longitude Ref               : East
GPS Altitude Ref                : Unknown (0 0)
GPS Altitude                    : 521.7 m Below Sea Level
GPS Latitude                    : 54 deg 37' 38.64" N
GPS Longitude                   : 58 deg 45' 0.06" E
GPS Position                    : 54 deg 37' 38.64" N, 58 deg 45' 0.06" E

How to solve?
Thank you.

StarGeek

Your command only copies tags back into the same file.  For example, if you have a file .\change\IMG_001.jpg, the %d will use the directory .\change\ and the %f will use the base filename IMG_001 and you add .jpg for the extension.  The resulting source name is .\change\IMG_001.jpg, the same file you are trying to copy tags to.  The format for the -TagsFromFile option is -TagsFromFile SOURCE -TAGS DESTINATION

Where are your source files located?

Also, you can simply use -All:All, you don't need to redirect the tag copy.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

lavAzza

Yes you are right. I didn't understand the meaning of %% d. I removed this variable and now everything works.
Thank you very much.