how to copy metadata from folder1 to folder2

Started by Newsky, August 21, 2015, 03:33:32 AM

Previous topic - Next topic

Newsky

After facial recognition to Picasa with the option "Store name tags in photo", many photographs remove a lot of the metadata (GPS, etc) (but it appeared to me necessary data on persons XMP-mwg-rs)
How can I move all the missing metadata from a same-structure folder with the original pictures? (without removing new data XMP-mwg-rs)

to restore:
D:\tests\
`---photo
    `---Дети
        `---Снежана
            `---2015

sources:
D:\tests_2\
`---photo
    `---Дети
        `---Снежана
            `---2015

I tried this code here:

exiftool -r -m -Tagsfromfile D:\tests\%f.jpg -ext jpg D:\tests_2 -overwrite_original

and I get the error:



Where is my mistake in the code? Please, help. thanks
Sorry for my english. I use Google translator

Phil Harvey

Try this:

D:
cd \tests_2
exiftool -r -m -Tagsfromfile D:\tests\%d%f.jpg -ext jpg .


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

Newsky

Perfectly! Thank you very much, everything turned out! Low reverence to you, Phil
Sorry for my english. I use Google translator

Newsky

Always use the program, I do not cease to thank you, Phil, for her!

It took a little bit to change the task of the post.
As can be:
1. Rewrite all metadata from tests_2
2. Rewrite only certain fields from tests_2 (for example: -XMP-photoshop:Country  -XMP-photoshop:State -XMP-photoshop:City)

It is rewritten, rather than adding those missing in tests?
Sorry for my english. I use Google translator

Phil Harvey

To copy only the tags you mentioned, the command would be:

exiftool -r -m -Tagsfromfile D:\tests\%d%f.jpg -XMP-photoshop:Country -XMP-photoshop:State -XMP-photoshop:City -ext jpg .

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

Newsky

There was a similar task, but I just can not understand how to solve it.
There are two folders:
1: d: \ photo \ Mobile \ Camera \ 2017 \
2: d: \ photo \ Mobile \ DNG \ 2017 \
In the first one there are JPG, the geodata from which you need to copy and OVERWRITE to the second folder containing the files of DNG
All files in the folders have the same names.
Help please make syntax for this task

Sorry for my english. I use Google translator

Phil Harvey

Try this:

1. First set the current working directory to the DNG base folder:

cd d:\photo\Mobile\DNG

2. Then run exiftool to copy the GPS tags from the JPG files, recursing into all subdirectories (the last "." is significant, and tells exiftool to process files in the current directory, which should now be the DNG folder):

exiftool -tagsfromfile d:\photo\Mobile\Camera\%d%f.jpg -gps:all -ext dng -r .

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