Folders and file names that sort by date
A folder pattern that puts the date first so everything sorts in time order, names that every computer can read, camera file names left alone, and a short description of the scheme kept with the files.
- Start here: the essentials
- Put the date first
- The folder pattern
- Safe characters and short names
- Write the scheme down
- Folders and photo apps
- Naming scans
- Name lengths, strict character sets and renaming every file
- See it: Leo, Nadia and Ruth
- Practice: one year, one event
- Your photos
- Check your work
- Knowledge check and scenario
Start here Essentials
For a first pass, this chapter asks you to choose a folder pattern that puts the date first, make one year folder and one event folder on it, and write down how the scheme works. You do not rename any photo.
- Choose a date form and write the folder pattern on the plan sheet. The default is
2026/2026-07-04_lake-trip(put the date first, the folder pattern). - Make one year folder and one event folder inside it. Use letters, numbers, hyphens and underscores only (safe characters).
- Move or export one event's photos into the event folder. Leave the file names as the camera made them (folders and photo apps).
- Write two or three sentences describing the scheme on the plan sheet. Say what the folders mean and where the originals are (write the scheme down).
Minimum time: about 30 minutes. Done when: one year folder holds one event folder named on the pattern, and the description is on the plan sheet.
Put the date first Understand
A computer lists folders and files by comparing their names one character at a time, from the left. The first character decides the order; the second matters only when the first is the same, and so on. Harvard Medical School's data management guide says this is why the most important information goes first, and that the date goes first if you look for files by date (Harvard Medical School, File Naming Conventions). MIT Libraries make the same point: names that start with the year and month sort differently from names that start with the month and day (MIT Libraries, Organize your files). Principle
Photos are found mostly by when they were taken: a summer, a birthday, the year someone was small. So in a photo library the date goes first. The table shows the same four folders named two ways, in the order a computer lists them.
| Named month first, as written in the US | Named year first |
|---|---|
| 07-04-2026 lake trip | 2024-12-25_christmas |
| 07-20-2025 beach | 2025-07-20_beach |
| 12-25-2024 christmas | 2026-03-02_snow-day |
| 3-2-2026 snow day | 2026-07-04_lake-trip |
The left column is out of time order: July 2026 sits above December 2024, and March 2026 falls to the bottom because "3" without a leading zero sorts after "1". The right column lists in time order with no effort, because the year comes first, then the month, then the day, each with a fixed number of digits.
ISO 8601, and the two shapes it allows
The year-month-day order comes from ISO 8601, the international standard for writing dates. It allows two shapes. The basic format has no punctuation: 20260704. The extended format has hyphens: 2026-07-04. Both are valid ISO 8601; a W3C note that profiles the standard describes both (W3C, Date and Time Formats). The guides split between them. Harvard accepts either; Stanford's libraries suggest the basic format; the UK Data Service uses the hyphenated one.
The rule that matters more than which you choose: use one shape everywhere. RFC 3339, the internet standard for timestamps, says date strings written from the largest unit to the smallest can be sorted as plain text and come out in time order, and that mixing optional punctuation breaks this (RFC 3339, section 5.1). A folder named 20260704 and another named 2026-07-05 do not sort together correctly, because "0" and "-" compare as different characters. Principle
This manual's default is the hyphenated form, YYYY-MM-DD. It is ISO 8601, it sorts, and a person can read 2026-07-04 at a glance where 20260704 takes a moment. This manual's convention If you prefer the basic form, use it throughout and write it on the plan sheet's "Date form" line; the name checker flags any name that uses the other one.
The folder pattern
This manual's pattern has two levels. This manual's convention
- A year folder for each year:
2026. - Inside it, an event folder for each event, named with the date first, an underscore, then a few words joined by hyphens:
2026-07-04_lake-trip.
The photos go inside the event folder with the names the camera gave them. So a photo's place on the drive reads 2026/2026-07-04_lake-trip/IMG_4120.HEIC. The year folder keeps a decade of events to a short list, and the date in the event folder's name sorts the year in time order, whatever the files inside are called.
| Situation | Folder name | Why |
|---|---|---|
| A one-day event | 2026-07-04_lake-trip | Date first, then a few words |
| An event over several days | 2026-08-15_coast-trip | The first day's date; the folder sorts where the trip began |
| A month of everyday photos with no event | 2026-03_march | Year and month only; ISO 8601 allows the shorter form |
| Two events on one day | 2026-05-10_ada-recital and 2026-05-10_dinner | Same date; the words separate them |
| A known year, unknown month | 1971_beach | Year only; it sorts at the start of 1971 |
Why the camera's file names stay as they are
The photo files keep the names the camera or phone gave them. This manual does not rename them, for three reasons. This manual's convention
- Pairs are matched by name. A Live Photo exports as a still and a video with the same name; a camera's raw file and its JPEG share a name; an XMP sidecar has the name of its photo (Apple's Export guide for Mac; ExifTool's documentation on sidecars). Renaming one file of a pair and not the other breaks the link. That is our inference from how those files are named; neither source says it in those words.
- The date is in the folder. A photo's date taken is also stored inside the file, so a file name does not need to carry it.
- Renaming is work that can go wrong. A tool that renames thousands of files can be set up wrongly once and change all of them.
The tradeoff is real: a single photo copied out of its folder carries no date in its name. Its date taken stays inside the file, and an app that reads it will still sort it. Renaming every file with a date prefix is the other choice, and it is under Go deeper.
Lowercase words, hyphens between them
The words after the date are short, lowercase, and joined by hyphens: lake-trip, not Lake Trip. Lowercase avoids one Windows trap: Microsoft says Windows treats OSCAR, Oscar and oscar as the same name, so two folders that differ only in capitals cannot sit side by side there (Microsoft Learn, Naming Files). The underscore after the date marks where the date ends. Preference
Safe characters and short names
A name that works on your phone may not survive a copy to another computer, a drive formatted for another system, or a cloud service. The safe set is small: letters, numbers, hyphens and underscores, with one period before the extension. The National Archives' advice for family digitizing says to use no spaces, punctuation or symbols, with hyphens or underscores in place of spaces (National Archives, Digitizing Family Papers and Photographs), and Stanford's libraries say plainly not to use spaces (Stanford Libraries, Name files). Convention
| Avoid | Why | Use instead |
|---|---|---|
| Spaces | Some programs and web addresses misread them; Stanford and the National Archives advise against them | A hyphen or underscore: lake-trip |
< > : " / \ | ? * | Microsoft reserves these characters; Windows will not save a name that contains them | Leave them out |
| A time such as 14:30 | The colon is one of the reserved characters | 1430, or leave the time out |
| CON, PRN, AUX, NUL, COM1 to COM9, LPT1 to LPT9 | Microsoft reserves these names, even with an extension added | Any other word |
| A name ending in a space or a period | Microsoft says not to end a file or folder name with either | End with a letter or number |
Other symbols: ~ ! @ # $ % ^ & ( ) ; , [ ] { } ' | Harvard and Stanford list them to avoid | Leave them out |
| More than one period | A period marks the extension; the National Archives' transfer rules allow one | Hyphens |
| "final", "new", "latest" | They stop being true; the UK Data Service and Harvard both advise against them | A date |
Sources: Microsoft Learn, Naming Files; Harvard Medical School; Stanford Libraries; National Archives Bulletin 2015-04, Appendix B; UK Data Service, Structuring folders. Product-specific for the Windows rows.
Leading zeros
Numbers in names sort as text, so 10 lists before 2. A leading zero fixes this: 02 before 10, and 001 before 010 before 100. Stanford's guide recommends leading zeros so files sort in order. Dates in ISO form already carry them (07, not 7). Use them for box and batch numbers too: box01, not box1. Convention
Short names and shallow folders
A path is the whole address of a file: the drive, every folder it sits in, and its name. Microsoft says the Windows programming interface defines a maximum path of 260 characters, and that longer paths work only when a setting is changed and the program is written to allow them, which "isn't a change that will affect all applications" (Microsoft Learn, Maximum Path Length Limitation). Product-specific A library copied into a deep folder on a backup drive can cross that line. Keep event words to two or three, and keep the year folder near the top of the drive. Harvard gives 40 to 50 characters as a length for a file name; our event folder names run about 20. The figures are compared under Go deeper.
The name checker takes a pasted list of folder or file names and flags spaces, reserved characters and names, a date in the other form, names over 50 characters, and "final", "new" or "latest". Nothing you paste leaves the browser.
Write the scheme down
A folder pattern that lives only in your head is lost the day someone else opens the drive. The Library of Congress's advice on personal photos includes writing a brief description of the folder structure (Library of Congress, Keeping Personal Digital Photographs). Harvard, Stanford and the UK Data Service each call this file a readme: a short text kept with the files that explains how they are organized and named. Convention
Two or three sentences are enough. Say what the folders mean, which date form you use, that the file names are the camera's, and where the originals and copies are. For example:
Photos are in one folder per year. Inside each year, one folder per event or month, named date first as YYYY-MM-DD and a few words, for example 2026-07-04_lake-trip. File names are as the camera made them. The originals are in iCloud Photos; this drive holds exported originals, updated each season.
Write it on the plan sheet's "Description of the scheme" line (Library plan). The plan prints as the description of your library. If you work on a computer, also save the same sentences as a text file named README.txt at the top of the drive or folder, so the description travels with the photos. Convention
Folders and photo apps
A photo library app and a folder of files organize photos in different ways, and the difference matters when you name things.
Albums are views, not folders
In a photo app, an album is a list that points at photos in the library. The same photo can be in five albums and still be one file. Apple's Mac guide says deleting a photo from an album removes it only from the album, not from the library, and Google says deleting a photo from Google Photos removes it from its albums too. You can name albums however you like; the app keeps its own files and its own names underneath. Product-specific
So the folder pattern is for folders: on a computer, on a drive, or in an export. Inside an app library, do not rename or move the app's own files in the computer's file browser. The app expects to manage them. If your master library is an app, the pattern applies to the exported copies you keep on a drive, which is the archive copy One home for your photos describes.
Exports from Apple Photos
In Photos on a Mac (Photos 12, macOS 27), the Export and Export Unmodified Original commands both have a File Name menu with three choices: use the titles you gave the photos, their file names, or a sequential number with your text before it. Apple's own example of a sequential name is "Birthday - 1", which has spaces. Choose the file name option, which keeps the camera's names. The Subfolder Format menu can split an export into subfolders; choose None and make your own event folder instead, so the names follow your pattern (Apple, Export photos on Mac). Product-specific
On an iPhone in iOS 27, Apple's guide exports unmodified originals to a connected drive with Share, then Export Unmodified Original, then the drive under Locations, then Save; for an edited photo, the unmodified original is what is exported (Apple's iPhone guide, import and export). The Files app makes folders: open a location, tap the More button, then New Folder; Apple notes that if New Folder does not appear, that location does not allow folders (Apple's iPhone guide, organize files and folders). Touch and hold a file or folder in Files to Move it. Apple adds that with Apple Intelligence, Files suggests a name when you rename a file; for photo files, decline it and keep the camera's name.
A downloaded file's date can change
Google says that when you download a photo, your operating system can give the file a new timestamp, while the photo's own date stays in the file's details (Google Photos Help, download photos). Product-specific A folder sorted by "date modified" after a download can therefore show the day you downloaded, not the day you took the photos. This is one more reason the date lives in the folder name, where nothing changes it.
Naming scans
Scans are the exception to "leave the file names alone". A scanner names files by its own count (Scan001, Scan002), which says nothing about the photo, so scans are named by you, date first where the date is known. This manual's convention The Library of Congress's scanning handout gives the same idea with an example name that starts with the date in the basic form and ends with a sequence number (Library of Congress, Scanning Your Personal Collections), and the National Archives' family digitizing page gives the character rules above.
| What you know | Folder | File names |
|---|---|---|
| Year and month | 1971/1971-07_beach | 1971-07_beach_001.tif, 1971-07_beach_002.tif |
| Year only | 1971/1971_beach | 1971_beach_001.tif |
| An estimated year | 1968/1968-ca_arthurs-car | 1968-ca_arthurs-car_001.tif |
| No date | undated/box01 | box01_001.tif, numbered in the order they came out of the box |
| The back of a print | Same folder as the front | 1971-07_beach_001-back.tif: the front's name with -back added |
| A sharing copy | Beside the master, or in a sharing folder | 1971-07_beach_001.jpg: same name, different extension |
"ca" (circa) after an estimated year keeps the year first, so the folder sorts with its year, after the dated folders of that year. The wording of the estimate itself ("approximately 1968") belongs in the caption, and the date to set in the app for an estimate is in Dates, captions and people; the folder name only places the scan in its year. A box or batch number keeps undated scans in the order of the originals, so a scan can be traced back to its print. A back is named like its front with -back added, the form Prints, slides and negatives uses, so the two sort side by side. This manual's convention The scanning settings, and which files are masters, are in Prints, slides and negatives.
These patterns are conventions from archives and universities, adapted for a family library. No standard sets a folder pattern for families, and the one here is one sound choice, not the only one. A photo library app keeps its own files in its own way: do not rename or move files inside it. The Windows rules are Microsoft's and apply to Windows; other systems allow more, but a name that follows the safe set works on all of them.
Name lengths, strict character sets and renaming every file Go deeper
Length figures compared
| Source | Figure | What it applies to |
|---|---|---|
| Harvard Medical School | 40 to 50 characters | A file name, as a convention |
| National Archives, Bulletin 2015-04 Appendix B | 255 characters; no more than eight folder levels | The whole path, for records transferred to the National Archives |
| Microsoft, Maximum Path Length Limitation | 260 characters (about 256 usable after the drive letter); each folder or file name commonly 255 | The Windows programming interface, for most programs |
| ExifTool for Windows | 246 characters | One tool's own limit, as its documentation states |
The figures measure different things. Harvard's is a habit for readable names; the others are limits. A path of D:\2026\2026-07-04_lake-trip\IMG_4120.HEIC is 42 characters, far inside every limit. Paths grow when a library is copied into someone's user folder, a cloud sync folder and a backup folder, one inside another.
Windows long paths
Microsoft says that from Windows 10 version 1607, longer paths are available only when the LongPathsEnabled registry setting or a group policy is on and the program declares that it supports them. Changing a system setting is not something this manual asks you to do. Short names are the simpler fix.
The National Archives' strict set
Appendix B of the National Archives' 2015 bulletin is a federal rule for agencies transferring records, not advice for families. It allows only lowercase a to z, 0 to 9, underscores and hyphens; no spaces; no period in folder names; one period in file names; and no more than eight folder levels. It does not set a date format. Our pattern fits inside it, which is one way to know a name will travel.
Who uses which date form
Harvard accepts YYYYMMDD or YYYY-MM-DD; Stanford suggests YYYYMMDD or YYMMDD; the UK Data Service gives YYYY-MM-DD; the Library of Congress's scanning handout uses the basic form in its example. The W3C note settles that both shapes are ISO 8601. A two-digit year (YYMMDD) is shorter, but 1971 and 2071 look the same; for a family library that spans decades, a four-digit year is clearer.
Renaming every file with the date first
The other choice is to rename each photo so its name starts with its date and time: 2026-07-04_1430_lake-trip_001.heic. It makes every file self-explaining when it is copied out alone, and some people prefer it. The costs: pairs (Live Photo halves, raw and JPEG, sidecars) have to be renamed together; a renaming tool that reads the wrong date renames everything wrongly; and the camera's own names, which some software uses to match files, are gone. If you choose it, rename on a copy, check a sample, and write the rule on the plan sheet's "File names" line.
See it: Leo, Nadia and Ruth See it
Leo Tran is a fictional person, and every fact about him here is invented for this manual. He has an Android phone backing up to Google Photos in Original quality, a Windows laptop with OneDrive and Files On-Demand on, and a mirrorless camera that saves raw and JPEG pairs; about 3,400 raw files are on the laptop.
Known: his pattern, 2026/2026-08-15_coast-trip; his camera's pairs share a name and differ in extension. His decision: raw and JPEG files keep the camera's names, so each pair sorts side by side and stays together. Assumed: his library sits in his OneDrive Pictures folder, so a photo's path reads like C:\Users\leo\OneDrive\Pictures\2026\2026-08-15_coast-trip\DSC_0123.JPG, about 70 characters. Under that assumption he is far inside Windows' 260. Open: whether the files in those folders are really on the laptop or are OneDrive placeholders; Backups settles it, and Leo is the one who checks.
Nadia Brooks (fictional) has one iPhone with iCloud Photos on, no computer, and a 1 TB USB-C drive. Her master library is iCloud Photos; the drive holds exported originals.
What she does. In the Files app she opens the drive, makes a folder 2026, and inside it 2026-06-14_beach-with-lila (the date is invented for this example). She selects that day's photos in Photos, exports the unmodified originals to the drive, and moves them into the event folder in Files. She declines the suggested names. On the plan sheet she writes: "YYYY-MM-DD. File names as the camera made them. Year folders on the USB-C drive, one folder per event inside. Originals are in iCloud Photos; the drive holds exported originals." Known: the folder names follow the pattern; the name checker flags nothing. Open: whether the export kept her captions, which Dates, captions and people tests; Nadia settles it with one captioned photo.
Ruth Feldman (fictional) keeps her library in Apple Photos on a MacBook. She has a shoebox of about 600 prints from the 1960s to the 1990s and two carousels of slides taken by her late husband, Arthur Feldman.
Known: the 1971 beach photos are from 1971; some undated prints are estimated as "approximately 1968" from Arthur's car and the square format. Her scan folders: 1971/1971_beach, 1968/1968-ca_arthurs-car, and undated/box01 for the rest. The backs with writing are scanned and named like their fronts with -back added, for example 1971_beach_012-back.tif. Open: the month of the beach photos, and who is in them; her cousin Miriam Katz is the person who may know, and the question goes on the captions sheet (Captions). If a month turns up, Ruth renames the folder 1971-07_beach and its files with it, under that new fact.
Free pages behind the conventions:
- Stanford Libraries, Name files: dates, leading zeros, characters to avoid and the readme, on one page.
- UK Data Service, Structuring folders and directories: the hyphenated date, vague labels to avoid, and a top-level README.
- Microsoft Learn, Naming Files, Paths, and Namespaces: the characters and names Windows reserves.
Practice: one year, one event Practice
Minimum: one year folder with one event folder inside it, the event's photos moved or exported in with their names unchanged, and the pattern, date form and description on the plan sheet. Time: about 30 minutes. Materials: the computer, drive or phone that holds your folders (on an iPhone, the Files app and a connected drive), and the library plan.
- Write the date form and folder pattern on the plan sheet: YYYY-MM-DD and
YYYY/YYYY-MM-DD_short-words, or your own. - Pick one event with a known date.
- Make the year folder and the event folder at the top of the drive or folder that holds your archive copies.
- Move or export the event's photos into it. Choose the option that keeps file names; decline any suggested renaming.
- Paste the two folder names into the name checker and fix anything it flags.
- Write the description on the plan sheet, two or three sentences.
Check an existing collection. List the folder names of an old drive or laptop (one per line) and paste them into the name checker. Count the flags by kind: spaces, reserved characters, mixed date forms, "final". Write the count on the plan sheet's notes, and rename folders, not files, one year at a time, on a copy you can check.
Your photos Your photos
Check your work Check your work
Criteria
- Does every folder name start with the date, in one form, with leading zeros?
- Do the names use only letters, numbers, hyphens and underscores?
- Are the photo files still named as the camera made them, with pairs still side by side?
- Does the plan sheet name the date form and the folder pattern?
- Would someone opening the drive for the first time understand the folders from the description alone?
- Is the pattern used outside the photo app, not inside its own files?
Worked example
Nadia's drive has 2026/2026-06-14_beach-with-lila with her exported originals inside, names unchanged. The name checker flags nothing. Her plan sheet names YYYY-MM-DD, the pattern, and three sentences of description that say where the originals are. It passes. It does not yet show that captions travel with the export; that is a separate test.
Common mistakes
- Mixing 20260704 and 2026-07-04. The two sort apart. Pick one and write it down.
- Writing the date as 7-4-2026. Month first and no leading zeros put July 2026 above December 2024.
- Renaming photos with an app's export names such as "Birthday - 1": spaces, and the camera's names are gone.
- Folders inside folders inside folders. Two levels are enough; deep paths can pass Windows' limit when copied.
- Moving files around inside an app's library in the computer's file browser. Organize the app with albums, and use folders for exports.
- Naming a folder "final" or "new". Use the date.
What is still unresolved
The rest of the years still need folders; the routine in Routines and handing on brings each month's photos in on the pattern. Whether captions survive an export is a test in Dates, captions and people. Dates you do not know for scans are worked out there too. Whether the drive with these folders is a working backup is settled in Backups.