Broken links: how to automate updates across the vault?

Hi there!
Please help me!

I didn’t know that using Unicode characters in directory and file names can cause problems with cloud storage sync software. And this seemed to be happening with my desktop cloud storage sync program. So I decided to remove Unicode characters from my Obsidian storage directory and file names. My step-by-step process was as follows:

  1. I renamed some directories, removing only the Unicode characters from the directory names, leaving the text name the same for all directories and files in the repository.
  2. Immediately after that, Obsidian hung for a long time. After many minutes of waiting, I closed Obsidian.
  3. On restarts – Obsidian hung while loading the cache.
  4. I found a solution on the internet that deleting the cache folders (Cache, Code Cache, DawnCache, GPUCache, IndexedDB) can help, so I deleted them in the folder: C:\Users\MyName\AppData\Roaming\obsidian.
  5. Then Obsidian is able to load, but many links in notes and canvases are no longer displayed (broken links).

Please help me to fix the problem and automatically update the links to the files (they are in the same place, in the repository). After all, manually changing links – it will take me many days (I have a large storage). And I have no knowledge of programming and writing code to study my problem in depth somehow.

Friends, very much hope for your help and responsiveness!

Environment

System info
Obsidian version: v1.6.2
Installer version: v1.4.13
Operating system: Windows 10 Pro 10.0.19041
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: dark
Community theme: Sodalite v0.7.1
Snippets enabled: 0
Restricted mode: off
Plugins installed: 42
Plugins enabled: 41
	1: Kanban v2.0.51
	2: Paste URL into selection v1.7.0
	3: Dataview v0.5.66
	4: Timelines v0.3.2
	5: MySnippets v1.2.3
	6: Hotkeys++ v0.2.7
	7: Editor Syntax Highlight v0.1.3
	8: Emoji Toolbar v0.4.1
	9: Highlightr v1.2.2
	10: Spoiler Block v1.0.0
	11: Mind Map v1.1.0
	12: Audio Player v0.1.1
	13: HTML Reader v1.0.12
	14: HTML Tags Autocomplete v0.0.7
	15: Paste As Html v1.0.2
	16: Surfing v0.9.12
	17: Prominent Bookmarked Files v2.0.2
	18: Smart Typography v1.0.18
	19: Typewriter Scroll v0.2.2
	20: Excalidraw v2.2.4
	21: ExcaliBrain v0.2.15
	22: Copy document as HTML v0.7.0
	23: Clear Unused Images v1.1.0
	24: Awesome Image v0.1.3
	25: Convert url to preview (iframe) v0.5.0
	26: Core Search Assistant v0.9.2
	27: Local Images Plus v0.15.9
	28: Outliner v4.8.1
	29: Copy as HTML v1.1.3
	30: Image Context Menus v1.7.1
	31: Annotator v0.2.11
	32: Mermaid Tools v1.1.3
	33: Link Exploder v0.3.0
	34: Optimize Canvas Connections v1.0.0
	35: Canvas Filter v0.9.4
	36: Iconize v2.12.1
	37: Index Checker v1.0.1
	38: Plugin Update Tracker v1.5.2
	39: Advanced URI v1.40.1
	40: Note Linker v1.2.4
	41: Templater v2.3.3

Additional information

Once the links are broken, they are broken. Obsidian will be unable to track those old broken links to fix them. If you do not have backups, you will need to fix this manually.

That said, an external program can be of great help in cutting down the time to fix. Here are some instructions on using VSCode to find and replace instances of text in a set of files.

So for example, say you have a bunch of [[text-here]] and you need it to be [[text here]]:

  • The find will be: [[text-here]]
  • The replace will be: [[text here]]

VSCode will update all the matches, and then Obsidian will start tracking those links again for when you rename within your vault in the future.

1 Like

Hi!
@Sigrunixia, thank you so much!

I am addressing to everyone who found this forum thread and has a similar problem.
If anyone else can benefit from my experience – I used “Visual Studio Code”, replace functions:
• Replace in document: Ctrl+H
• Replace in selected folder and subfolders: Ctrl+Shift+H

Quickly removed Unicode characters from the code (links) of markdown notes and canvases.
However, some canvases then stopped opening and I used the validator service to auto-correct the code of canvases that didn’t open – after correcting the code of canvases, they started opening again.

I will be glad to your additions and comments.

@kepano, hi!
Is it possible to add new functionality (built-in plugin) to Obsidian, which would eliminate this problem described by me above? When you rename the root folder in a large vault, Obsidian can freeze for a long time (or forever). If you clear the cache to re-enter Obsidian – old links not updated will stop working. It would be great to have a built-in feature in Obsidian that would solve this problem.


I found out some interesting information. What is there to implement hard link functionality in Obsidian?
Example, the programs: «SyncUp» and «Apple Time Machine» — know how to create hard links to files.

A hard link, in the context of «SyncUp» and «Apple Time Machine», is a special type of file reference on the file system. It differs from a regular shortcut in that it doesn’t just point to the location of a file, but creates an additional name for the same file.

Imagine you have a file named “document.txt”. Creating a hard link to it would mean creating a new name, such as “backup.txt”, which would point directly to the same data as “document.txt”.

Here are some key points to know about hard links:

One file, multiple names: Hard links don’t create copies of a file, they simply provide additional names to access existing data.
Space saving: Because they reference the same data, hard links do not take up additional storage space.
Efficient backups: «SyncUp» and «Apple Time Machine» use hard links for incremental backups. During each backup, new hard links are created for new or changed files, instead of copying everything over again.
Faster Restore: With hard links, restoring files from backups is much faster because you are not copying data, but simply accessing an existing file under a different name.


Respectfully.

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