Will Externally Renamed Files Lose All Backlinks? Do Settings Matter?

Am I correct that any external file name edits will cause Obsidian to lose all links to any such renamed files? Related: do any of the File and Link → New Link Format settings help/hurt this?

I am a new user thinking about workflow and future-proofing my Obsidian workflow and structure. Because Obsidian does not have bulk-file-renaming capabilities (please tell me I am wrong), if one ever wanted to edit their naming structure, one would have to use an external editor for bulk name edits, e.g. adding/changing a date prefix/suffix etc.

If one is forever stuck with an initial naming schema, that makes getting starting a Live-with-it-forever proposition. Not the Forever-Flexible headline of the program.

Do I have this wrong?

Thanks!

2 Likes

In order to have Obsidian update your links, you have to rename the file within Obsidian. It shouldn’t be too hard to remove, for example, 10 characters from all links that start with something like “2022-07-08” across your entire vault using a regex search and replace in an external editor like VSCode. The same goes for using something like the PowerRename utility within Windows PowerToys to do a regex search and replace upon the note names.

There is a plugin to do regex search and replace within Obsidian note content but not on the actual note names. Here is a link for a feature request for such capabilities: Find and replace for note names

Thanks.

1 Like

Hi ,

Thanks very much for your reply

I’m afraid your reply makes me further confused as follows

I understand on one hand you are saying file name changes need to be made inside obsidian. but then you go on to talk about external tools that can be used to edit file names. aren’t those two mutually exclusive?

if possible would you mind clarifying? I am hoping there is a way to use the types of external tools you describe to bulk edit names of a vault full of files but, I have always assumed that will cause all links to be lost. your answer seems ambiguous about that

Thanks again for your help

1 Like

It is somewhat risky, but as long as you are both renaming the note and all links to the note, everything should be fine regardless of whether you are doing this outside Obsidian manually note by note and link by link or using tools.

I should note that if you are using pipe characters (alternative link display text) this should be taken into account in your regex when you are doing search and replace for the links. I probably should clarify that the ability to do these mass search and replace for links and also for note names would have to be across the board. For example, I don’t think it would work out if you just wanted to remove the prefixes from an arbitrary selection of links and the matching notes. That is, it would not work unless there were some regex that could isolate just those notes.

Anyways, I hope this helps some. I can try to come up with my best regex expression if you want to give a detailed explanation of your goal. I would highly recommend experimenting on test files and when you get around to trying on your actual vault, make multiple backups and make them often. Things can go surprisingly wrong.

Good luck!

1 Like

Remember that the links are just text, and links and backlinks are necessarily links to files with precisely that text.

Making a name change within Obsidian updates the text in links to that file.

With an external bulk editor you have to remember to change both file names and the relevant text in the files (easily specified within your link signifier). If you are happy doing the one, you should be as comfortable doing the other.

I’m not sure Obsidian’s design is modeled around file naming schemas that might be changed. It is more about managing notes by links, tags and (to a degree) folders. And search. It work with naming schemas, but it’s not the ideal workflow if you’re likely to change them.

Thanks for your reply

Blockquote
With an external bulk editor you have to remember to change both file names and the relevant text in the files (easily specified within your link signifier). If you are happy doing the one, you should be as comfortable doing the other.
Blockquote

Yes, this is the part I did not understand from the earlier answers: as you state, the point being, one would need to both change the file name and then update all links within the files accordingly. Yes I imagine that can be done with external tools if one is extremely careful and diligent in the types of changes made, such as adding a date suffix etc.

Thanks

1 Like