Rename multiple flies overwriting existing ones

Hello,

I want to create a button to help me in this situation:

A friend got infected by some ransomware and got lots of files encrypted.
He managed to decrypt them with a program but now he has the whole HD with this structure:

Folder |- Another folder | |- aaaaa.txt (crypted file) | |- bbbbb.txt (crypted file) | |- cccccc.txt (good file) | |- decrypt_aaaaa.txt (decrypted good file) | |- decrypt_bbbbb.txt (decrypted good file) |- 0001.jpg (crypted file) |- decrypt_0001.jpg (decrypted good file) ...
And so on.

The button I want to create is something to rename the decrypted files to its original names and replace the existing bad ones, and do it recursively.
I tried it with the advanced rename using "decrypt_" as old name and "" as new name, but it fails saying that file already exists.
And it hasn't the "replace all" option, not even the "replace". It only lets you to autorename the good files leaving the bad ones untouched.

There is no arguments in the rename command to force the overwrite, and I'm stuck.
I'm sure mighty DOpus can do this, but I lack the acknowledge...

Can someone enlighten me?

Thanks in advance.

If you do it using the Opus 12 beta, you'll get a Replace option (can either rename the existing file out of the way, or delete the existing file).

Since it is a beta, and the rename functionality has changed a lot, it may be worth backing up everything first, just in case.

There are some ways it could be done in Opus 11, but probably not so easily. e.g. You could have a rename script that checked if the new name already exists and moved what was there out of the way before allowing the main rename to go ahead.

Oh, great news.
Now I'm even more interested in the next version =)
But I will patiently wait for the public stable release.

My scripting skills aren't good enough to make such renaming script...
So meanwhile I workarounded the issue with a button that use flat view (to make it recursive), copy with a pattern with force overwrite existing files, and finally a delete with filter.

Its a very slow process, but I'm not in a hurry. And the most important, it works. =D

Thanks for the quick answer!