Obsidian manages links between files by tracking file name changes and updating backlinks. If you change files names outside of Obsidian, this check does not occur. If a programmatic solution requires changes to file names, it should be accomplished via an Obsidian plugin (instead of external scripts)