Copying GPS data from one directory of photos to another

Started by salford_eh, August 02, 2017, 02:25:06 PM

Previous topic - Next topic

salford_eh

I have 2 sets of images from an aerial survey, one from a DJI camera which has bundles of exif data, the GPS is extremely useful for photogrammetry, and one from a thermal camera, which doesn't record any exif data.

I want to transfer the exif data from the visual images to my thermal images.

I'm quite new with exiftool, but it's great! I managed to get the hang of a few of things.  I've transported the exif data from one file to another, but I have thousands of images I want to batch process.

The cmd line I used to transfer the exif data file by file was:

exiftool -tagsfromfile C:\visual\filename.jpg -gps:all C:\thermal\filename.jpg

Works perfectly.

I tried to batch process the images as recommended in a previous post using:

exiftool -tagsfromfile %d%f.jpg -r -gps:all -ext JPG C:\thermal

it does something, as it creates original files in the target folder, but the exif data doesn't change.

I've tried different variations on this code, such as

exiftool -tagsfromfile C:\visual -gps:all C:\thermal

but it says "Warning:error opening file" or "no file selected".


Any advice on this would be greatly received.


Thanks for the help!

StarGeek

You're very close.  You just have to combine the two properly.

Try this
exiftool -tagsfromfile C:\visual\%F -gps:all C:\thermal

"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

Phil Harvey

I think you may need to add a file extension to StarGeek's command:

exiftool -tagsfromfile C:\visual\%f.%e -gps:all C:\thermal

- 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

Look at that over there!

*ninja*edit*

I have no idea what you're talking about, Phil ::)
"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

Phil Harvey

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

salford_eh

Both work! :D I just need to make sure the files have the same names. I'm sure there's an easy fix for this. Hard part done though.

Life savers.... Can't thank you enough!



That and your awesome Ninja skills......




geo-nerd

I'm trying to do the same thing however I'm trying to transfer GPS information from Radiometric JPGs to Tiffs. Using the exif command for changing a single file worked:


exiftool -tagsfromfile "C:\h20t_Imagery\InputImagery\DJI_20210513151247_0003_THRM.JPG" -gps:all "C:\h20t_Imagery\OutputImagery\OutputImagery\DJI_20210513151247_0003_THRM_TEMP.tiff"


but the batch process did not. I tried what you guys suggested:

exiftool -tagsfromfile C:\h20t_Imagery\InputImagery\%f.%e -gps:all -ext TIF C:\h20t_Imagery\OutputImagery\OutputImagery


as well as:


exiftool -tagsfromfile C:\h20t_Imagery\InputImagery\%F -gps:all C:\h20t_Imagery\OutputImagery\OutputImagery


Any help is appreciated greatly!

StarGeek

Replace the %e, which stands for the extension, with the extension of the file you are copying from.  So if it's from jpegs, then
C:\h20t_Imagery\InputImagery\%f.jpg
"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