ExifTool Forum

ExifTool => Newbies => Topic started by: XftlArd on May 17, 2015, 01:39:29 PM

Title: Copy GPS information from one picture into all pictures of a directory
Post by: XftlArd on May 17, 2015, 01:39:29 PM
Good afternoon,

I am a beginner with ExifTool. I want to fullfill all files from a specific directory with the GPS coordinates from one specific picture, saved in an another directory.
I managed to put the GPS information from the reference picture in a CSV file (exiftool -common -csv DIR > out1.csv). Then, I copied informations of the first line, numerous times, in order to have as many lines as pictures in my directory, manually. I wrote these coordinates in each file of the directory, with ExifTool (exiftool -csv=Dir/out1.csv Dir2).
But, I find that it needs to many manual operations to do that.
Is it possible to do that automatically?
If yes, is it possible to avoid any over-writing, if some GPS informations exist, or to check if GPS information exist and jump to the next picture?

Thank You

Title: Re: Copy GPS information from one picture into all pictures of a directory
Post by: Phil Harvey on May 17, 2015, 10:54:31 PM
If the gps coordinates are already in an image, it is easiest to just copy them over:

exiftool -tagsfromfile SRCFILE -gps:all -wm cg DIR

where SRCFILE is your source file, and DIR is one or more target files and/or directory names.

Here the write mode is set so that existing tags are not changed (the -wm cg option), which should do what you wanted..

- Phil
Title: Re: Copy GPS information from one picture into all pictures of a directory
Post by: XftlArd on May 18, 2015, 02:11:53 AM
Thank you very much Phil!

Can I confess you that I think "how simple it is, when you know perfectly your language or software"

Regards