Alias for Folder names in Directory?

First, search the help docs and this forum. Maybe your question has been answered! The debugging steps can help, too. Still stuck? Delete this line and proceed.

What I’m trying to do

I have long folder names, e.g. 2023-03-17 (2023-04-05) Smith for an e-mail that was due on April 5, I actually sent on March 17 and was to be sent to a person called Smith. In this folder there would be drafts of the message or attachments, etc. However, because it’s so long this gets cut off, so all I see is 2023-03-17 (2023-04....

I would like to be able to see Smith and not just the dates, so I’m looking for solutions. Something I’ve thought of would be an alias for folder names. Is this possible somehow? I need the dates to be there for sorting purposes.

Are there any plugins that replace the folder name but retain the actual name’s sorting?


1 Like

There are a few options which spring to mind (other than a plugin to alias the folder name):

  1. Expand the file explorer
  2. Switch around the name and dates
  3. Use a shorter date format
  4. Use frontmatter, not the folder name

Let me expand on each of those a little.

Expand the file explorer

The simplest solution, if you got the monitor real estate (aka a large monitor), would be to simply expand the file explore panel to allow for wider/longer file names to be shown.

On a smaller monitor, this would possible need to be combined with using a hotkey to trigger the Toggle right sidebar command to show/hide the side panel.

Switch around the name and dates

So you basically are using a sentDate (estimatedDate) recipient as your folder name, if I understand you correctly. Doing recipient sentDate estimatedDate would change your sorting, but maybe doing sentDate recipient (estimatedDate) could be an option.

Then you’d see the emails related to when it was actually sent, but you’ll still get the hint related to when you estimated when it should have been sent (although it’ll now most likely will be cut off in the file explorer for some cases).

Use a shorter date format

I’m all in for using a date format, like the ISO 8601, to have readable dates (and readily available for sorting and Dataview and so on). But one argue for deviating from this in cases like this, if you truly insist on packing most information into a file/folder name.

So what are you options then?

  • “YYYY-MM-DD” – This is the recommended format, and is recognised as the ISO 8601 date format
  • “YYYYMMDD” – Not a unique format, since days and month can be switched around, but it’s still alphabetical
  • “YYMMDD” – Even more possibilities for screwing up and making unrecognisable dates. Will have a sorting issue related to years pre 2000, as it kind of assumes you’re in the 20YY range
  • custom formats - At one point, and I’m still using it, I devised a four letter combination for a full date:
    • 0-9A-Z – For the year after 2000, aka year after 2000 in base 36
    • 1-9A-C – For the month in base 13
    • 00-31 – For the day of month, in plain decimal. (This could also have been made base 36, but it reads a lot easier when I just kept it with two figures)
      • Some example of the last custom format, today 2023-03-28, would then be N328, and the last day of last year, 2022-12-31, would be MC31.

So using a custom format for the date could reduce one date from 10 characters to 4 (or even 3), while still keep the sorting ability of the date. Any format changes does however potentially introduce some confusion, so it kind of depend on your preferences.

Use frontmatter, not the folder name

Another option would be to utilise frontmatter for parts or all of the metadata for the folder. This would then require some queries to get to the various folders (or a folder note), and to allow sorting of the various emails.

Imagining frontmatter like the following:

sentDate: 2023-03-17
estimatedDate: 2023-04-05
- "[[Smith]]"
topic: "some topic"

Not sure what the best folder name would be in such a scheme, maybe the main topic of the emails? But in any case, if you put such a frontmatter in the “folder note”, it could have a query listing all the other files within that folder to see all the drafts, attachments, and so on.

And you could have broader query in another file listing the various folder note, without depending on the file explorer to show all of your metadata.

Such a scheme would also allow for various other queries, like emails to somebody particular, on various subjects, or date range, and a lot more.

On a side note, when I’m using my custom date format for my daily notes which enable neat file listings, I’m also adding the date: into the frontmatter to keep a fully readable date for those not accustomed to reading my date format (and for myself to easily see which letters corresponds to earlier years)). This also allows for dataview to get the proper date for its queries.

In summary, I think you either need to widen your file explore pane, or potentially change the date format or order of the element in your folder names. Or even better, from my point of view, switch to move to metadata into the frontmatter, and build queries to view the information instead of a fixed file explorer view.


Thanks so much for putting so much thought into this!

My usecase is actually a little more complicated. I was just using e-mail because I thought it’d be easier, but I’m actually working on applications, so I have a folder and a whole bunch of files and sub-folders. This makes using the frontmatter like you describe a little less useful, I think, since you don’t have a central note. Anyway I still used one of your suggestions:
I put the date in parentheses, the due date, into another note since it’s not that important once I’ve sent it in. This way I still have the date I sent it and a short title that I can now see.

Your custom date formats seem cool but a little too complicated for me.


1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.