8
\$\begingroup\$

I have hundreds of thousands of images in a set of about 50 folders, each of the folders has a varying number of subfolders. I'd like to extract certain pieces of metadata (latitude/longitude, data/time, camera model and serial number, maybe a few others) from all the images in those folders and their subfolders and export it in a table (CSV would be easiest), so that I can import the metadata into a database. I need to preserve at least 6 decimal places in the lat/long fields, the location data is important.

So I am looking for a piece of Windows software I can point at a folder and have it walk through that folder and all its subfolders, read the metadata, and export the metadata for each image on a line in a CSV file, like so:

Filepath,Filename,Lat,Long,CameraSerial
C:\Images1\Folder1\,Image0001.jpg,42.00000002,-75.00000001,A0193498
C:\Images1\Folder2\,Image0001.jpg,42.00000112,-75.00000067,A0193498
C:\Images1\FolderZ\,Image0001.jpg,42.00000492,-75.00000099,A0193498

I've found Camera Bits Photo Mechanic, which does what I need, but I was hoping there was a free/open source solution. Most of the tools I've found that do batch EXIF metadata exporting do so by exporting a separate text file for each input JPG, which is not what I'm after, I need one table per folder (and its subfolders).

\$\endgroup\$
0

3 Answers 3

6
\$\begingroup\$

You can do this fairly easily with the cross-platform free software ExifTool. It's even in in the FAQ:

The -csv (comma separated values) option solves this dilemma by pre-extracting information from all input files, then producing a sorted list of available tag names as the first row of the output, and organizing the information into columns for each tag. As well, a first column labelled "SourceFile" is generated. These features make it practical to use the -csv option for extracting all information from multiple images. For example, this command:

   exiftool -csv -r t/images > out.csv

gives an output like this:

   SourceFile,AEBBracketValue,AELock,AFAreaHeight,AFAreaMode,AFAreas,[...]
   t/images/Canon.jpg,0,,151,,,[...] t/images/Casio.jpg,,,,,,[...]
   t/images/Nikon.jpg,,,,Single Area,,[...]
   t/images/OlympusE1.jpg,,Off,,,"Center (121,121)-(133,133)",[...]

This will include a very long list, so if you want to just include a few specific things you can do that:

exiftool -csv -Model -CreateDate  -GPS:all -time:all *.jpg

(in this example, all of the files in the current directory).

The documentation warns that the -csv flag, unlike most exiftool options, builds the entire output in memory and so memory usage can be quite large when used on many files — probably best to script up something that goes folder-by-folder. (Easily done in even a simple batch language.)

\$\endgroup\$
1
\$\begingroup\$

The tool that comes to mind is an open source piece of software that works with a good variety of file formats:

http://meta-extractor.sourceforge.net/

It is a bit technical, but has a lot of customization that should meet your needs. This solution is for Windows and Linux only.

Also, if you have a copy of Adobe Photoshop, then you'll have Adobe Bridge which contains a metadata extractor.

\$\endgroup\$
1
  • \$\begingroup\$ This is by far the best response I've seen to this issue. I tried exift, but I didn't even know about the other two solutions. Thanks a lot for your direction and guidance. \$\endgroup\$
    – Monica
    Commented Sep 30, 2018 at 15:04
0
\$\begingroup\$

Just ran across this lovely tool from Australia, mate! lol

It's a Java program that ".. allows the metadata to be edited for individual images or handled in bulk by using its Export EXIF to CSV and Import EXIF from CSV."

It only works on jpg/jpeg files, but also has a built-in converter to convert png files to jpg. I needed it to export limited photo meta data to csv, where I then merged another csv file that had title, author, and date info.

eatlas.org image-metadata-editor

\$\endgroup\$

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