Disambiguiting mutiple files with the same name

Very new to obsidian (couple of hours) - I did the a Markup tutorial, I looked through the tutorial and I started experimenting.

What I don’t understand

I can create a reference to a new note (created or not) using [[reference]]

I can create a file of that name (say ‘Rules’ for example) in the file explorer and the reference automatically picks it up in my open note (visible change).

But here’s what I don’t get: Let’s say I’m developing a number of games and each has Rules. Each game is different.

As I build my note sections for each, I’d be thinking of a heirarchy like

  • Game Development
    ** Individual Game #1
    *** Rules
    *** Assets
    ** Individual Game #2
    *** Rules
    *** Assets
    *** Dice Mechanics

  • ** Individual Game #n
    *** Rules
    *** Assets
    *** Game Pieces

Let’s say I’m in the note for Individual Game #1 and I create a reference to [[Rules]]
I create a file Rules in the File Explorer (I think that’s what the pane is)
Then I go into Individual Game #2 and I create a reference to [[Rules]]
And I want to have a file with the Rules for Game 2 that is in the reference.

So my questions:
If I have a very large vault, is ‘Rules’ only allowed as a file name for one file?
If not, how does the system know when I refer to [[Rules]], which file I want?

The example above is simpler in heirarchy than my long term goal (say I want to be down 6 or 7 layers of notes down from the main one) and I need to create a Rules file for a particular game, do I need to create the file name as “Boardgame-Scifi-DesignNotes-IndividualGameName#1-Rules” in order to make it unique from “Boardgame-Scifi-DesignNotes-IndividualGame#2-Rules” or “Boardgame-Fantasy-DesignNotes-IndividualGameName#3-Rules”…?

Or is there a strategy that lets me have a bunch of ‘Rules’ files (or any other term that would be used multiple times in a vault) be unique without me having to have very long file names and manually unique ones?

Is there a way to have a filename 6 deep in a stack of notes be automatically identified by its predecessors?

I realize there would be a lot of cases where you’d want 1 file with a particular name that is referenced all over a heirarchy/graph, but in this case, I’m looking for unique files with a similar (exact) name (like Rules) but different content.

Or am I just trying to enforce a heirarchy because I’m used to file system metaphors?

Is there some better way to have some heirarchy and not have file name conflicts?

If you create a link to a file name that exists multiple times obsidian will automatically add the path to the link when you select it in the suggestion.

Another thing that might be useful to you is:
[[file|displayed text]] and Aliases

1 Like

For me, unique IDs in every note:

Angel

1 Like

One quick note. You can’t have # in file names, like in your examples.


The relevant setting for the behaviour that @joethei mentioned is in “Files & Links” → “New link format”

It will add the path automatically, according to the rule you choose in that setting. If you choose “Shortest path when possible”, it will use just the filename. And if there are conflicts, it will add the shortest path possible to resolve the conflict.

If you manually type some links that don’t have that path namespace, if I remember correctly, it will match the first one it finds. But I never bothered discovering if there was a pattern to that.


Another thing you can do as a workaround is use aliases. This changes the display of the link text, but points to whatever you want.

If you want a link that says “Rules”, but points to the file “Specific Game 3 Rules”, you can do this:

[[Specific Game 3 Rules|Rules]]

You’ll see only the name after the | character.

1 Like

All look like useful suggestions.

To be clear, I know I said “Game#2” but that I meant as a placeholder for an actual name - I realize the octothorpe is not valid in filenames. But thanks for mentioning it in case I didn’t!

It’s probably a good idea to have a unique ID generated for each page. If I have that and there’s a possibility to link to that, that could ensure what I want to get to was right.

Thanks for the tip on references that differ from their text. I’ll try that out too.

I have a question about the New Link aspect:

Presumably, it only acts on subsequently created pages. I’d have to manually go back and fix previously created pages. Do I understand that correctly?

I guess I need to understand the relationship between connectivity in notes and the location of files. What is the shortest path to a linked match? How does note graph distances correspond (if at all) to file location closeness? And if I pick absolute path, does that mean I have to specify the full file location or pick it from a drop down?

Things to experiment with I guess.

All good advice. Once I try them out, I’ll see which works the best for me (although technically all might be solutions to a degree or not.

Thanks for your time.

Obsidian will automatically update your links in your notes if it has to. You’ll see a little popup say something like “Updated 2 links in 2 files”. This operation won’t happen if you externally edit the files.

How to do multiple aliases inline or ergonomically sans friction.

[[file|aliasA|aliasB|aliasC]]

plez

1 Like

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