Rename Twice -- Standardizing internal links -- future-proofing Wikilinks

I’ve brought a little trick today – “Rename twice”


Preamble

As was mentioned in this thread, Obsidian is case-insensitive for internal links but it’s good to keep tidy notes with the correct note links, especially because we may want to ensure compatibility outside of Obsidian.

I have three types of note-naming conventions (I don’t do Zettels):

  • abc (now deprecated);
  • Abc (normal, used vault-wide);
  • ABC (used only for special cases to do with etymons).

My aliased links would look like:

  • [[Abc|abc]];
  • [[ABC|Abc]];
  • [[ABC|abc]] (because etymons can act as normal lexical items used today, but this should not concern you now).

Because I migrated all my notes from a different environment, some of my internal links/backlinks can still be wrong or inadequate for use outside of Obsidian.
Which means I used to do search and replace on my internal links (outside of Obsidian, with Notepad++).

Plunge

But what you can do instead is fix this internally by “Renaming twice” in Obsidian.

  • For this to work, you’d need to have Automatically update internal links enabled in Settings > Files and Links.

What you do first is rename your file wrong and then right again (as you cannot rename a file to the same existing name). This ensures all your backlinks to be standard now.

  • In both cases you will receive a message that your x links have been updated in y files.

In my case, [[Sat|sat]] and [[Sat]] were both wrong as my filename was SAT.md. Some links were correct (for outside use), others were not. I renamed the file first wrong (Sat.md), then right again (SAT.md), which made all my internal links correct.

  • The aliases are left untouched in the process.

This is a simple thing so don’t expect too much of it; you still need to take out the trash. :slight_smile:

3 Likes

I’ve done similar things in the past, often due to file system limitations, and then I often used an intermediate name as well. In other words, I’ve needed to take the route Sat.md to xSat.md to SAT.md.

Some file systems have not been happy with just changing the case, so this intermediate step with an alternate name has been needed.

1 Like

I remember my GitHub Desktop throwing issues last year or so but not anymore.

I had to delete the local file to be able to pull changes from the remote. It did not budge until I navigated to the file in the File Explorer and deleted the local copy (I think it was At to AT rename). Then the pull succeeded.

  • Mind you, the changes and pushes and pulls were done on the same computer/file system a week or so ago (I did rename once, not twice, not for the sake of updating internal links). So the issue may not have gone away.