Add names of individuals to large numbers of photos from CSV data?

Started by phototech, November 13, 2023, 08:08:14 AM

Previous topic - Next topic

phototech

Hello!  I tried searching, but either don't know how to properly word my search or just am overlooking the answer, if it is there.

I was wondering how I can accomplish this task.  Say I have a folder of 1000 images.  I have a CSV file which has all the file names along with a column that has the names of each person.  I would like to be able to add the individuals name in metadata to each file. 

ex.  Column one image.jpg
     Column two - John Smith

I would like to add John Smith as metadata to image.jpg and do the same for all the images listed in column one.  If Need be I can add a _ between the individual's First and Last name if that makes things easier.   

I am using Exiftool on a Macbook Pro M1. 

Thank you.

Phil Harvey

First, your CSV file must be in this exact format:

SourceFile,TAG
DIR/test1.jpg,Some Name
DIR/test2.jpg,Another Name

The first row of the CSV file should be "SourceFile", then a comma, then the name of the tag you want to write (eg. change "TAG" to "XMP:Description" or something like that).

The file paths should be the same as they would be when accessing the image file from the working directory.  (eg. in the above example the command would be -exiftool DIR -csv=my.csv, and the images would be in directory DIR).

- 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

The harder question is figuring out what TAG is the one you actually want to write.  And this depends upon what programs you are using to look at the file data.

Do you have a photo that already has the people's names in it?  If so, run the command in FAQ #3 on that file and look for the names in the output.  That will list the correct TAG to write to.

Also, do you only have one name per file or are there multiple names for each file? Are these names in the same row or do you have the same file name duplicated across multiple rows, one row per person? These answers will also affect the final command.
"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