I want to rename existing images inside their separate folder and then move them to another folder. Keeping links/file paths inside notes intact.
Things I have tried
I renamed image files inside O., using the right-click>Rename function and then typing the new name, clicking Enter after that.
That worked fine, since there weren’t that many, a little over two hundred.
When I had renamed them, I used again inside O., the Move to function, by selecting a number of files and moving them inside O. into the new folder.
I deleted the old folder when empty, which now sits in the O.-trash.
Yet: The links inside the notes show the old link/image file paths and names (combination of characters and numbers) - that way, image and notes cannot be matched…
Back up your entire Obsidian vault first, close Obsidian, open the vault folder in VS Code, use Ctrl+Shift+F (Windows/Linux) or Cmd+Shift+F (Mac) to toggle global find and replace, input the old and new image paths/names respectively, click Replace All after verifying matches, then reopen Obsidian to check
Thank you. But the thing is, I did the renaming already.
Now the old file names *can* be found in the notes, incl. paths.
*But* the files themselves have been renamed. Not trace apparently of their previous name to them…
So, I cannot batch search&replace …
What I need is, to somehow recover the old names to each image file.
Or better yet, have the matching done automatically, after all…
Do you have any backups of your Obsidian vault (e.g., a copy of the folder before renaming, system restore points, or Time Machine/Git history)? I had Git backups, so I could easily discard all changes—but if you only have the modified version of the data left, it’ll be really hard to recover the original filenames for the images.