# Subfolder patterns

> Well-defined subfolder patterns keep your IDs neat inside, whether you sort by date, name, or a simple numbered template.

## The trick to a well-organised system

IDs can be quite broad and contain a lot of stuff. The secret to keeping them neat is well-defined subfolders. We're going to put on our bossy voice for a moment. In order to say you should never have:

- Ad-hoc,
- Randomly named,
- Un-numbered subfolders in an ID.

That's the world of chaos we're escaping from. Everything has a pattern. Find it.

---

# Using the date

If you have a bunch of things whose creation date is a useful anchor, this is a great choice. For example, I create a dated subfolder when I process my quarterly income at `13.21` in the [Small Business System](/sbs/).

## How to do dates

There is one correct way: `yyyy-mm-dd`. [Year-month-day](https://www.iso.org/iso-8601-date-and-time-format.html). Because it sorts chronologically in your filesystem.

It's not a matter of preference. And you're not being unpatriotic if you eschew your nation's preferred date format. (I'm talking to you, America.) It's the only logical option.

## Alternatives

If you do things by **month**, try `yyyy-mm`:

- I use this in archives when the exact date is unclear.
- Or to refer to a whole month, not a specific day.

If you do things by **quarter**, try `yyyy-q1…4`:

- But caution, _calendar_ quarter or _tax_ quarter?

If you do things by **week**, try `yyyy-ww`:

- I used this for timesheets in an old job.
- Most calendar apps have an option to show week numbers.

---

# Using the alphabet

Most things aren't neatly organised by the alphabet. Which is why we use numbers to provide structure. But if you have things that naturally sort alphabetically (e.g. names), it makes no sense to ignore it.

## Example: be consistent

Let's say you have an ID called 'Suppliers for bakery ingredients'. Those suppliers each have a name. Use it!

And whether you start with first name, surname, or organisation name: _be consistent_. Or it won't sort. This sounds really obvious. But I can't tell you how many times I've seen a folder that looks like:

<JDLineDiagram
  text={`
                
     Ben Stiller
     Butcher, Lucy
     John Noble
     Zoolander, Derek   
                     
`}
  alt="Some inconsistently-named subfolders that do not sort. Some start with a firstname, some start with a surname, some have commas between the names."
  figNumber="62.35A"
  figCaption="Unsorted, inconsistently-named subfolders."
/>

## Example: add a number

You might want to sort primarily by the alphabet. But still need an identifying number. Add it _after_ the name in [square brackets].

The first entry you create gets [01], the second [02], and so on. But they won't appear this way in your list.

<JDLineDiagram
  text={`
                           
     Butcher, Lucy [03]   
     Noble, John [01]
     Stiller, Ben [04]
     Zoolander, Derek [02]   
                           
`}
  alt="Some consistently-named subfolders that sort alphabetically, and also have an identifying number at the end: Butcher, Lucy [03], Noble, John [01], Stiller, Ben [04], Zoolander, Derek [02]."
  figNumber="62.35B"
  figCaption="Alphabetically-sorted subfolders with an identifier."
/>

---

# The fallback pattern

When there isn't a 'natural' way to subfolder something, you need to make one up. But we need _some_ structure.

Use subfolders starting `10` through `90`, for example:

<JDLineDiagram
  text={`
                           
     10 Planning   
     20 Travel documents & visas   
     30 Transport
     40 Accommodation
     50 Itineraries & schedules
     60 Expenses to claim
                           
`}
  alt="A simple subfolder template from our systems' travel categories. There are six folders labelled: 10 Planning, 20 Travel documents & visas, 30 Transport, 40 Accommodation, 50 Itineraries & schedules, and 60 Expenses to claim."
  figNumber="62.35C"
  figCaption="A subfolder template from our systems' travel categories."
/>

## Advantages

- **Limited to nine subfolders:** this should be enough, but leaves room for expansion. You can sneak `15` between `10` and `20` if needed.
- **Sequences items logically:** the template above is the order that you plan, execute, and reconcile a trip.
- **Builds muscle-memory:** the numbers stay in place if you add additional items (a big benefit over the alphabet).

Related blog post: [Don't type the date by hand](https://jdcm.al/22.00.0094).