Skip to main content
This example flattens all photos — regardless of which subfolder they originally lived in — into a [year]/[month]/[day] folder hierarchy, and renames every file with its full taken date and time. The result is a single chronological archive that ignores the original folder names completely.

Command

Key arguments

Before and after

Before (photos/):
After (organized-albums/):

What you see in the output

All 17 source photos are reorganized by date, completely ignoring which album they came from. The Italy album photos taken on 22 October 2008 are grouped together under 2008/10/22/, and the Spain Journey photos from 10 April 2015 land in 2015/04/10/. Two photos share the exact same timestamp (2008.10.22_17.00.07), so photo-cli appends -1 and -2 to keep them distinct. The same applies to the two Madrid photos at 2015.04.10_20.12.23. Spain Journey/IMG_5397.jpg has no EXIF taken date, so it is placed at the root of the output as IMG_5397.jpg (the original file name is kept as a fallback).
This approach is useful when you want to build a single chronological archive from photos scattered across many differently named albums, and you do not need location data in the file names. It pairs well with the archive command when you want to run it incrementally over time.