ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: salford_eh on August 02, 2017, 02:25:06 PM

Title: Copying GPS data from one directory of photos to another
Post by: salford_eh on August 02, 2017, 02:25:06 PM
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!
Title: Re: Copying GPS data from one directory of photos to another
Post by: StarGeek on August 02, 2017, 04:29:08 PM
You're very close.  You just have to combine the two properly.

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

Title: Re: Copying GPS data from one directory of photos to another
Post by: Phil Harvey on August 02, 2017, 04:53:16 PM
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
Title: Re: Copying GPS data from one directory of photos to another
Post by: StarGeek on August 02, 2017, 05:43:40 PM
Look at that over there!

*ninja*edit*

I have no idea what you're talking about, Phil ::)
Title: Re: Copying GPS data from one directory of photos to another
Post by: Phil Harvey on August 02, 2017, 08:25:48 PM
/me dodges the flying shuriken :P
Title: Re: Copying GPS data from one directory of photos to another
Post by: salford_eh on August 03, 2017, 03:19:33 AM
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......



Title: Re: Copying GPS data from one directory of photos to another
Post by: geo-nerd on May 28, 2021, 06:55:39 PM
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!
Title: Re: Copying GPS data from one directory of photos to another
Post by: StarGeek on May 28, 2021, 08:04:00 PM
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