How can I find photos taken on the same month/day across different years?

Asked 3/18/2014

2 views

2 answers

0

I want to build a "memories" album that groups photos by the same calendar date across multiple years, such as all photos taken on April 1 in 2004–2014. Ideally I want a report like:

  • April 01 — Found: [photos...] Missing: []
  • January 31 — Found: [photos...] Missing: [2004, 2009]

I also want to sort or filter by how many years are missing, for example only dates with photos in every year, or dates missing just one or two years. Is there existing software or a workflow to do this from photo metadata/EXIF dates?

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

Photography Stack Exchange contributor

12y ago

2 Answers

4

You should decouple three programming concerns. (I use Linux commands, but they work with Cygwin and MinGW, too).

  1. Finding and listing files. This can be done with find -iname "..." through folders.

  2. Extracting EXIF data. This can be done with exiftool.

1+2 can be easily coupled with xargs. E.g. this command lists all tags related to "Date" (it is one line, no line break intended). You should pick one for further processing.

find -iname "*.NEF" -print0 | xargs -0 -I {} exiftool -d "%Y, %m, %d" -All {} | grep "Date"

E.g. you can pick "Create Date" and filter for that in exiftool.

By the way, if you want to see all time information for a file, use:

exiftool -time:all -a -G0:1 -s myimage.NEF

And if your files are all within subdirectories, you can use the -r option (and skip the find command obviously.)

Now, this command outputs ALL the time information available, for your postprocessing:

find -iname "*.NEF" -print0 | xargs -0 -I {} exiftool -csv -time:all -filename -a -G0:1 {} >outputlist.txt

3 . Sorting, filtering. Now, this should be easy, use your constraints.

The very easiest is to pull the data into Excel and apply filters, or better, import to an SQL database, and query whatever you would like to query. You will see that different files contain different amount of timestamp data, and you have to reconcile that.

An alternative is to use the -X option instead of -csv, and generate XML output. This may or may not be easier to postprocess for you.

Now, if you are sure that e.g. CreateDate is what you need, you could try this:

find -iname "*.NEF" -print0 | xargs -0 -I {} exiftool -T -d "#Year#%Y# #Month#%m# #Day#%d#" -filename -CreateDate {} | grep "#Month#05#" | grep "#Day#07#"

I think it is obvious how I spiced up the initial find+exiftool command. It will find any images with the creation date having month == May and day == 7.

Good luck! ;-)

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 workflow is to extract each photo’s EXIF capture date, then group by month/day and count which years are present or missing.

A commonly suggested tool is ExifTool. You can recursively scan your photo folders and export the capture date (for example, CreateDate) to CSV, then analyze that CSV in Excel or another spreadsheet/database tool.

Example approach from the answers:

  • Use ExifTool to read date metadata from all images.
  • Export CreateDate in a normalized format like YYYY-MM-DD.
  • In Excel, split that into month/day and year.
  • Group by month/day, count how many distinct years appear, and derive missing years/counts.

This gives you exactly the kind of summary you want, such as dates with full coverage across all years or dates missing only a few years.

If you only need date-based browsing, Picasa was also suggested as a simple organizer that groups photos by date, but for reporting missing years and sorting by completeness, the ExifTool-to-CSV method is the better fit.

UniqueBot

AI

12y ago

Your Answer