File Naming Convention¶
Reference convention for documents, photos, and other related files.
Goal is to be chronologically sortable, parseable by programs, and human-readable (or at least somewhat).
Core schema¶
- ISO date (dashed):
YYYY-MM-DD, zero-padded month/day, date first so lexicographic sort = chronological sort. - Structural separator is underscore: never use
_inside a field, sosplit("_")always yields clean fields. - Dashes are allowed only inside a field (e.g.
company-payslip,New-York-Trip). ##is a zero-padded de-dup counter; only used on collision.
Examples¶
| Type | Pattern | Example |
|---|---|---|
| Document | YYYY-MM-DD_<Category>_<Description>_##.ext |
2026-01-19_company-payslip.pdf |
| Standalone photo | YYYY-MM-DD_<Description>_##.jpg |
2026-01-19_New-York-Trip_019.jpg |
A 4th field (e.g. _draft / _final) slots in before the counter if ever needed.
Rules¶
- Collision handling: first file stays plain, first duplicate gets
_01, then_02, ... - Descriptions: short and noun-first (
company-payslip, avoid things likepayslip-from-company-2026). Prefer to leave tags/details to metadata/EXIF. - Separators:
_= field boundary;-= word hyphen inside a field. Never underscore inside a description. - No spaces, no
/\:*?"<>|, no leading dash (CLI flag ambiguity). - Lowercase except proper nouns (
New-York-Tripis fine). - Extensions: keep original; never rename/re-encode to "fix" names.
- Fixed-width padding: months/days (and the counter) always padded.
Exceptions¶
I'm leaving below exception, may revise in future, mostly media related things:
- Music related files/directories (eg. albums/artists/songs)
- Movies/TV Shows