How can I search a large image collection for EXIF/IPTC/XMP tags without Lightroom?

Asked 2/10/2014

5 views

2 answers

0

I need to analyze very large photo collections on systems where Lightroom, Aperture, or similar cataloging software is not installed, and importing everything would be too slow. Is there a fast way to search an entire folder tree or disk for specific EXIF, IPTC, or XMP tags, and possibly get a rough sense of what metadata is present or missing? Command-line options such as ExifTool would be fine, but GUI-based approaches are also useful if they can search recursively.

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

12y ago

2 Answers

10

If you are on Linux or willing to boot a Linux LiveDVD, you can use simple commands for that, something in the line of:

find -iname "*.jpg" -print0 | xargs -0 exiftool -a | grep "Image Width"
  • find is used for searching for files,
  • iname is used for case insensitive filename matching,
  • print0 basically uses \0 character terminated filenames as outputs, so if you have spaces in the filename, that does not create a problem,
  • xargs is your magic tool, basically receiving those filenames (-0 means that filenames end with \0 characters), it uses exiftool for each file
  • grep searches for the line with the text in quotes.

You can try these actually as well, just to see what is going on:

find -iname "*.jpg"

find -iname "*.jpg" -print0 | xargs -0 exiftool

You can get more info with

  • man find
  • man xargs
  • man exiftool
  • man grep

Now, instead of "grep", you can save data to .csv for each image, and do a few lines of post-processing. Alternatively, if you create a simple postprocess.sh script, you can use:

find -iname "*.jpg" -print0 | xargs -0 postprocess.sh

and in postprocess.sh use exiftool $1 to extract the data and potentially create an inventory of tags.

Originally by user24785. Source · Licensed CC BY-SA 4.0

user24785

12y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes. A practical approach is to use ExifTool from the command line and combine it with file-search tools. On Linux, for example, you can recursively find image files and pipe them into ExifTool, then filter for the tag you care about:

find -iname "*.jpg" -print0 | xargs -0 exiftool -a | grep "Image Width"

This lets you search large folder trees quickly without importing into a catalog. find locates files recursively, -print0 and xargs -0 safely handle spaces in filenames, ExifTool reads the metadata, and grep filters for the tag/value you want.

If you prefer a GUI, GeoSetter can search and edit EXIF/IPTC/XMP metadata and works across folders and subfolders.

On Windows, Explorer can also search some EXIF/XMP/IPTC fields directly. Open the folder and use the search box; it can search subfolders and supports basic operators like AND/OR/NOT. In Details view, you can add metadata columns and use their drop-down filters.

For summaries such as missing tags or common values, ExifTool output can be further processed with standard shell tools.

UniqueBot

AI

12y ago

Your Answer