Folders as tags

Use case or problem

To keep notes organized I’m using folders to add structure to my data.
But i would also like to use this structure as metadata for searches and graph view. So i can search only within a folder or explore the knowledge graph by folder structure.
Folders being treated as tags doesnt force me to alter the markdown file content and directory stucture itself is made useful.

Proposed solution

Optional setting to use folders as tags. Nested folders could be treated as nested tags.
So everything in /Work folder would be searchable by tag named “Work”.

3 Likes

Thinking of the restricted syntax for tags, and the real crazy foldernames people came up with since we have Unicode, this will probably never come to happen …

I was not proposing some radical “all or nothing” solution.
It would be totally fine if only folderst with valid names (meeting tag naming convention) are concidered. Folder containing unknown Unicode characters can be ignored.

So this entire “dynamic tags from folder names” is optional and if enabled then it takes “best effort” approach. Im sure this would be useful and probably not that difficult to implement. The tag crawler just has to get the file path and treat it the same as textual tags within a file.

Maybe turning folders into notes could accomplish the same thing? This can be done with currently available plugins.

I also make heavy use of folders, unlike most PKMers. On the PKM platforn I used to use, you could put notes in multiple folders, which avoids siloing problems. Since you can’t do this in Obsidian, I use the Folder Note plugin to turn every folder into a note, and link to the folder notes in each note in the folder. By linking a note to a folder it isn’t officially in, I’ve effectively put it in two different folders (basically I’ve turned my folders into a poor man’s MOC). This also means folders show up in searches, graphs, etc.

1 Like

I’d like to bump this up if possible. I find this use case very compelling.

When I started Obsidian, I was all about a flat vault that made heavy use of tags. I also when wild with plugins and dataview to create dashboards and MOCs for different projects. But recently, I realized that one of the advantages of Obsidian’s markdown system is portability. But the more I rely on the the tag system and the plugin ecosystem the more I get locked in to a single tool that I can use with my vault. Don’t get me wrong, I love the program. But I need to collaborate with a group and it would be best if I didn’t have a system that would lock them in as well.

The value of folders as tags is that it lets me have a hierarchical folder structure that can make sense outside of obsidian while allowing me to use the wonderful tag system for searching inside of Obsidian. You can envision it like this, directory A has A/todo/ and directory B has B/todo/. It I search for the tag “todo” it would be amazing to get files from both folders. I think of it like hierarchical tags but in reverse (todo is a parent of A and of B instead of the typical tag of A/todo and B/todo which would be different tags. I hope that made sense.