Write tags to multiple files by reading corresponding table

Started by bradosav, December 02, 2015, 08:45:42 AM

Previous topic - Next topic

bradosav

I am trying to grapple with exiftool on the command line (using Windoze). While I dig through the documentation and the forum, perhaps someone could help me out. I have a set of images that need to have GPSLatitude, GPSLongitude, Image description, Artist, Copyright, and - XPTitle and XPDescription. I know the latter two are not very popular, but that is what Flickr reads and displays. The files are all in one directory, and the metadata source file is a tab separated text file, where the file name of the corresponding image is listed. The file is also attached to this post. What I need is a script that would take the information and write it to the image. Perhaps someone has done that before? Or something similar?

I would really appreciate any help! Thanks!

Boris

bradosav

I don't know much about how the photos were created, but they do appear not to have any camera metadata. There is an example of the existing exif attached to this post.

THANKS!

StarGeek

The easiest thing to do, IMO, is to change your tab delimited text file into a CSV file, which is something that ExifTool can read directly.  I've done that and attached it new file to this post.  I did this with LibreOffice, though I'm sure that Excel would also be able to do this.

Now, there are a few caveats.  The first column has to be the SourceFile column.  I've moved your File column and renamed it, so that's a start.  Additionally, SourceFile column needs either the full path to the file or you need CD to the directory the files are in and run the ExifTool command from there.

Another change that had to be made was to change the gps tag location.  EXIF gps tags are unsigned and if the values are negative, they require the matching GPSLatitudeRef and GPSLongitudeRef to be set properly.  I changed the tag locations to XMP GPS tags, which do allow negative values.  You can then set the EXIF gps tags properly with the config file and command in this post by Phil.  Your other option would be to add GPSLatitudeRef and GPSLongitudeRef columns to the file and set them properly.

The command to add the CVS values to the files is as simple as
ExifTool -csv="path/to/metadata.cvs" DIR
"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

bradosav

Hello StarGeek! Thanks so much for putting in the work! I really appreciate it! As I was a bit of a hurry, I tried it on my own and succeeded! First I exported all of the exif data into a csv:

exiftool.exe -a -u -csv *.jpg > out.csv

this was useful because I could see how the different strings looked like in files that already had the info. The rest was just simple editing, cut and paste. When I was finished editing out.csv, I updated the exifs:

exiftool.exe -csv=out.csv *.jpg

A really kick-ass tool you folks made!

Thanks! Thanks! Thanks! Thanks!