Filename Duplication Prevention Idea

So, one of the things I’ve stumbled on with Obsidian, is the ability to replace rigid folder structures with links and backlinks. I find this concept to be freeing, however I fear I’m going to run into the natural limitations of my imagination when it comes to file names. I can easily see the need for scripts that I write to have the same name, but to keep them separate, I would need to name one of them slightly differently, and that may have other ramifications as far as linking and backlinking and my code repo are concerned.

In a near-folderless structure, this will become a problem. As of right now, the following is true:

  • NoteTitle == NoteTitle.md

What if they didn’t have to be. In Markdown, we already have the concept of a decorator in links: [[NoteTitle|Fancy Note Title]], how about applying this to filenames when they are created. If we use the Zettlekasten code concept, then consider this:

  • NoteTitle == NoteTitle##20200618T124400.md

The code is generated automatically by Obsidian in the background when the file is originally created and separated from the title with some delineator (that may need to be different per operating system) Inside the Editor interface, we can see the whole filename; inside the preview pane, we see only NoteTitle.

This would allow people who like Zettlekasten to be able to use the ID and have it programmatically generated for them, and for those of use who aren’t robots, we can still use a fancy title name without fear of file duplication. I can also see the ability to link to either part of the filename equally.

5 Likes

I agree we need some way to disconnect from the limitations of filenames.

Related posts:
https://forum.obsidian.md/t/aliases-for-file-references/783
https://forum.obsidian.md/t/use-h1-or-front-matter-title-instead-of-or-in-addition-to-filename-as-display-name/687

2 Likes

I love this idea. I’m also finding it incredibly freeing to not think about folder structure, but rely instead on linking. Such a simple concept, but feels so much better.

I would also add that I don’t really care what my file is named. I’d prefer to rely on H1s or frontmatter.

One simple way to avoid duplication is to implement a suggestions/autocomplete bar like like what we get for inter-links. This can help you avoid for duplicate filenames and also encourage to pick more meaningful title. This does not mess a lot with how things are implemented under the hood.

1 Like

This is a great idea.

I agree with this generally. But if you make a duplicate title (with different ID), how do you distinguish them when [[linking]] for example?