Folder Sort Order

I’m trying to do what feels like the simplest thing in the world, but doesn’t seem to have an answer. Anything I have found on the topic revolves around custom sorting for notes within folders, but I don’t care about any of that, I just want to sort the folders themselves like you can in any file explorer (Windows/Linux etc).

Every one of my notes sits under it’s own folder (so one folder = one note). It looks like this:

<note date-time-id>
  <note>
  <attachment-1>
  <attachment-2>

So in reality it looks like this (I’ve redacted note titles):

image

The notes with the oldest dates are at the top, and the newest at the bottom. That’s annoying, but I can live with it on desktop because it’s easy to scroll to the bottom, but on Android it takes ages to get to the bottom of the file browser, because I have thousands of notes.

All I want to do is use the “Change sort order” button to reverse this ordering but the button doesn’t seem to work at the folder level, only the note level.

image

To clarify what I’m trying to achieve here’s an example of the correct behaviour in my operating system’s file explorer.

This matches how Obsidian is sorting my folders currently:
image

This shows what I want:
image

Any ideas?

This comes up every now and then, and there is a feature request related to it with some pretty decent workarounds. See the post below, and that thread in general .

Thanks @holroy will take a look at that post.

For anybody looking for similar in the future, the plugin mentioned above did the job very well.

I added a sortspec.md file to my vault’s content directory, and added the following frontmatter to it, then enabled the plugin.

The below also “pins” my inbox.md and todo.md notes to the top, and sortspec.md to the bottom. It then sorts in descending order, with most recently edited notes at the top.

sorting-spec: |
  target-folder: content
  inbox
  todo
  %
  sortspec
  order-desc: advanced modified
1 Like

Cheers! Leaving my use case here on the off chance it helps anybody in the future.

Deriving from jakpri’s previous answer, I use this to descend all sub-folders whilst burying the sortspec file in the root folder.

---
sorting-spec: |
  order-desc: a-z

  %
  sortspec
  
  target-folder: /PATH/*
  > a-z
---