This example groups photos into a country/city/town folder hierarchy based on their GPS coordinates, and names each file with the taken date and address. The original folder structure is discarded entirely; the new structure comes from the locations embedded in the photo EXIF data.Documentation Index
Fetch the complete documentation index at: https://photocli.com/llms.txt
Use this file to discover all available pages before exploring further.
Command
Key arguments
| Argument | Value | What it does |
|---|---|---|
--process-type | FlattenAllSubFolders | Ignores the original folder hierarchy and pools all photos together before grouping. |
--group-by | AddressHierarchy | Creates nested output folders from the address components: [country]/[city]/[town]. |
--naming-style | DayAddress | Names each file as {yyyy.MM.dd}-{address}.ext, with the date followed by the address. |
--reverse-geocode | OpenStreetMapFoundation | Uses the OpenStreetMap Nominatim API to resolve GPS coordinates into address fields. |
--openstreetmap-properties | country city town suburb | Selects which address fields to use when building folder names and file names. |
--number-style | OnlySequentialNumbers | Appends -1, -2, etc. to disambiguate files that would otherwise share the same name. |
--no-taken-date | AppendToEndOrderByFileName | Photos with no taken date are appended at the end of their folder, ordered by original file name. |
--no-coordinate | InSubFolder | Photos with no GPS coordinate are placed in a no-address subfolder at the root of the output. |
Before and after
Before (photos/):
organized-albums/):
What you see in the output
Photos are organized by location, not by their original album names. All ten Arezzo photos from the Italy album land inItalia/Arezzo/, named 2008.10.22-Italia-Arezzo-1.jpg through 2008.10.22-Italia-Arezzo-10.jpg. The one Florence photo goes into Italia/Firenze/Quartiere 1/. The two Madrid photos from Spain Journey land in España/Madrid/.
The folder depth matches the number of distinct address levels returned by OpenStreetMap for each location. A single photo taken in Kenya resolves to only a country, so its folder is Kenya/ with no city or town sub-level.
Two photos land in
no-address/: Italy album/IMG_2371.jpg has a taken date but no GPS coordinate, and Spain Journey/IMG_5397.jpg has neither a date nor a coordinate. Both are placed in no-address/ at the root of the output because --no-coordinate InSubFolder routes GPS-less photos there. Their original file names are preserved.