← All guides

Lists and text · Worked example

Make filenames sortable without making them mysterious

Use a date-first naming pattern, five before-and-after examples and a duplicate-name check to organise a small set of files without losing their meaning.

A sortable filename should still tell you what you are opening. Putting a date first helps with order; keeping recognisable project and document labels makes that order useful.

For a small set of files, try YYYY-MM-DD_project_document_vNN.ext. The worked example below uses five constructed filenames. It is a naming method to apply yourself, not a batch-renaming feature on this site.

Give each field one job

Use underscores between fields and hyphens between words within a field. Keep labels in lowercase. For example:

2026-09-03_maple-hall_budget_v02.xlsx

Read it as: document dated 3 September 2026, Maple Hall project, budget, version 2, spreadsheet extension unchanged.

  • YYYY-MM-DD: the document date, with a four-digit year, two-digit month and two-digit day. For this example, use the date already stated in each original filename. Do not substitute today’s date or the date you happen to rename it.
  • project: a recognisable project label, such as maple-hall or river-appeal. Keep the same label for that project throughout the set.
  • document: a short description of the content, such as budget, minutes or brief. Keep words that distinguish genuinely different documents.
  • vNN: the existing version number, written with two digits: version 2 becomes v02; version 12 stays v12. Renaming does not create a new version.
  • .ext: the existing file extension. Leave it unchanged; a new name is not a file-format conversion.

This version field covers 01–99. If your set needs larger numbers, agree a wider fixed-width field for the whole set rather than mixing widths.

Try it on five filenames

These dates, project labels and versions are illustrative, not records from an organisation. The rows are arranged by the proposed names in ascending order.

BeforeAfter
Maple Hall budget 2026-08-28 v1.xlsx2026-08-28_maple-hall_budget_v01.xlsx
Maple Hall brief v12 2026-09-03.pdf2026-09-03_maple-hall_brief_v12.pdf
Maple Hall budget 2026-09-03 v2.xlsx2026-09-03_maple-hall_budget_v02.xlsx
River Appeal minutes 2026-09-03 v1.docx2026-09-03_river-appeal_minutes_v01.docx
River Appeal budget v3 2026-09-10.xlsx2026-09-10_river-appeal_budget_v03.xlsx

Choose filename sorting in ascending order, not sorting by the file’s modification date. With these fixed-width dates, sorting the names as text puts 28 August before 3 September before 10 September. Names sharing a date then sort by project, document label and version. For otherwise matching fields, v02 comes before v12.

This is date-first sorting, not project-first grouping. If your main job is viewing every Maple Hall document together, a project folder may be more useful than expecting this filename order to do both jobs.

Check what survived the change

Compare each proposed name with its original before applying it:

  1. Dates: Maple Hall’s two budgets keep different dates: 28 August and 3 September 2026. Every date in the table is carried across unchanged.
  2. Versions: the five original numbers, in table order, are 1, 12, 2, 1 and 3. The proposals preserve them as 01, 12, 02, 01 and 03.
  3. Project labels: “Maple Hall” becomes maple-hall; “River Appeal” becomes river-appeal. Neither is shortened to an unexplained code or merged with the other.
  4. Document labels and extensions: budget, brief and minutes retain their meaning, and each extension stays attached to its file.

If a date is missing or ambiguous, stop that row and confirm it. Do not turn 03-09 into a confident-looking full date without knowing what it means. Likewise, confirm a missing version rather than assuming it is version 1.

Catch duplicate proposals before renaming

Keep a two-column list of original and proposed names. Sort whole rows by the proposed-name column, keeping each original beside its proposal. Inspect adjacent entries for identical complete names, including the extension. Also compare each proposal with names already in the destination folder. For this convention, treat names differing only in capital letters as a collision too.

For example, another original called Maple Hall budget v02 2026-09-03.xlsx would produce the same proposed name as the third row. Different originals do not guarantee different outputs.

A collision does not prove the contents are duplicates. Open and compare the files. If they are distinct, restore a meaningful missing distinction, such as budget-approved versus budget-working, only when the contents support it. Do not invent a later version just to make the name unique, and do not overwrite either file.

For five files, check the list first, then rename one at a time and compare the finished names with the proposals. Keep the mapping until you have checked the whole set. The tidy order is useful only if the names still tell the truth.