I recently wrote about using ExifTool to edit the metadata stored within your images, particularly in relation to that information which is displayed in Lightroom. When I’m working with my images, I have a set of shell (BASH) scripts that I use to add or amend metadata, and I thought I’d make them available for other people to look at for inspiration, or even use if you find they meet your needs. For example, to add a title to the metadata of a specific image, I would run the following in a Terminal window:
$ img_title.sh "This is my title." myphoto.jpg
To add the same title to all the images in a directory, I could type:
$ img_title.sh "This is my title." -all
There are a couple of things to note when using the scripts:
- This is all done on a Mac. If you’re on Windows then I’m sorry. If you’re on Linux, I guess this should work, but I’ve not tried it.
- I’ve assumed that you’re comfortable running shell scripts in a Terminal; if you’re not happy doing this then I’d suggest you might be better either using Lightroom to manage your metadata, or investigating one of the graphical front ends for ExifTool.
- These scripts are designed specifically for my own use; it’s highly unlikely that they’ll be perfect for what you need straight away. Feel free to modify them yourself if you want (but please keep the header, including my website URL, intact).
- The scripts don’t just add information to those fields which display in Lightroom, they add it to as many fields as is possible / relevant. For example, the
EXIF:XPTitle
field is not displayed anywhere in Lightroom, but theimg_title.sh
script still adds your title to that field anyway. - You can get an example of how to run each script by just running it without passing any arguments at all. Further information about each script can be found in the header at the top of the file (just view the file in Terminal, for example).
- To install the scripts, just unzip the downloaded file (see below for the link), and move the entire folder to
/Library/Scripts
. Then add the following line to your~/.bashrc
file:PATH=$PATH:/Library/Scripts/metadata
You can download a zip file containing all the scripts here.
Lots of good info, I liked the Lightroom table. Just wanted to comment on your EXIF:XPTitle example, though. Windows XP actually does not process XPTitle if ImageDescription is also present. You have to remove ImageDescription if you want XPTitle to work.
I work as a tech volunteer for a local historical society. We’ve scanned a few K historic pictures & would like add descriptive comments that “stick” to the image files. The subject matter expert is not a techie. I’d like to make a drag/drop app that does the following:
1. drag/drop image file on app winddow
2. prompt for comment text (more than 1 item)
then I’ll execute exiftool–
% exiftool -Comment=”text from 2. above” “file-from-1.-above”
Suggestions?