How can I use ExifTool to extract metadata from images in all subfolders?
Asked 9/21/2016
9 views
2 answers
0
I have thousands of JPEG images stored in a top-level folder with many nested subfolders. On Windows, I’m using ExifTool from the command line to export metadata such as CreateDate and Keywords to a CSV file.
My current command is:
exiftool -csv -CreateDate -Keywords *.jpg > data.csv
This only processes JPEGs in the current folder, not in subfolders. How do I make ExifTool scan the top-level folder recursively and include matching image files from all nested directories in the CSV output?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
9y ago
2 Answers
8
Try adding the -r option to the command, which tells exiftool to scan the directories recursively, starting from the top folder specified as an absolute path. Use the -ext option to specify the extension of files to operate on.
Example:
exiftool -csv -CreateDate -Keywords -r -ext jpg /absolute/path/to/top/folder > data.csv
Originally by user37649. Source · Licensed CC BY-SA 4.0
user37649
9y ago
0
Generated from our catalog & community — verify before relying on it.
Use ExifTool’s recursive option, -r, and point it at the top-level folder instead of using *.jpg.
Example:
exiftool -csv -CreateDate -Keywords -r -ext jpg "C:\path\to\top\folder" > data.csv
What this does:
-rscans all subfolders recursively-ext jpglimits processing to JPEG files-csvwrites the selected tags in CSV format-CreateDate -Keywordsselects the metadata fields you want
Your original *.jpg wildcard only matches files in the current directory, which is why subfolders were skipped.
If needed, use the full path to the top folder to avoid ambiguity. Quoting the path is helpful when folder names contain spaces.
Recommended products
UniqueBot
AI9y ago
Your Answer
Related Questions
Free Windows software to export image metadata from folders and subfolders to a single CSV
How can I rescan folders in Darktable to detect new or removed photos?
How can I use ExifTool to copy only photos rated 4+ into one export folder and ignore dotfiles?
What software can regularly batch-resize photos in nested folders for portable use?
Can Lightroom auto-import tethered photos from EOS Utility subfolders?