I have a weird situation in on my hands and hope to find some direction/hints...

The ultimate goal is to have a Lightroom catalog with about 30 000 keyworded images in it.

The images are all JPEG, inside a single folder, each with unique numerical name, like 123456789.jpg.

The keywords are inside a mysql database and I can dump them and/or process the list in whatever format needed (for example tab/space separated "filename"-"keywords" value).

I know I can import keywords from text files in LR, but that won't match them to the images, AFAIK. So I presume I have to first run some kind of EXIF batch to match filename to keyword set and insert the keywords in JPEG files. After that I hope LR will recognize the EXIF during import (I've tested that and it seems to work).

So that's about it. Any help appreciated!

PS: The two topics I found helpful in the final resolution of the problem:


1 Answer 1


You could export the tags as a batch script that runs exiftool to add the keywords to the JPEG files:

exiftool -keywords+=banana 111.jpg
exiftool -keywords+=fruit 111.jpg
exiftool -keywords+=tree 112.jpg

with a query resembling this:

select concat('exiftool -keywords+=',KEYWORD,' ',FILE_NUMBER,'.jpg') from IMAGE

and then

  • backup your images
  • run the generated batch script
  • import the images into Lightroom
  • \$\begingroup\$ Thanks for the exiftool pointer! Extremely useful tool, as it seems! What I did was similar: - mysqldump -T with --fields-terminated-by=, - exiftool -csv="name of csv file" *.jpg - import into LR The test with 10 images was successful, now it's time to run the whole 30 000 :) \$\endgroup\$ Commented Oct 10, 2011 at 13:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.