Simple Script W/ Prompts --> Rename Attachments Folders Recursively

Hi there. I can’t seem to easily see that this has been rectified before on the forum, but I was having the issue of creating two separate vaults that I wanted to merge later on.

I made the mistake of having the vaults have different folder names for all attachments.

So in my case one vault had all folders like:

  • folder/subfolder/attachments
  • folder/attachments

The other vault had:

  • folder/subfolder/media
  • folder/media

And I knew it would be painful to rename all of the folders in the vault from “media” to “attachments” to bring them together happily.

I ALSO happened to want to learn some Golang so I wrote a small script that will prompt the user for an:

  • original folder name
  • the new name
  • a path

It should then ask if you’re okay with the changes and automatically rename all folders with one name to the new name.

If you’re going to use this, test it first. I take no responsibility here if it does something wacky.

It’s precompiled in the release with a linux binary, but if you want to install golang or compile for windows you can use it as well. Perhaps I will compile a windows binary myself and release.

Link to repository - Obs-VaultAttachMerge

How it looks: