Select files inside folder (and sub folders) and move them

Hi!

I messed up something and I need help from someone who can give me a hand, if possible.

I would like to have a script that does the following, in order:
1 - Selects a folder in Finder
2 - Go through all files inside that folder and all subfolders
3 - Find all files that have the exact same name, while one of them has something different at the end (for example: filenameA.jpg and filenameA-delete.jpg) and check if they both have the exact same size in kb/mb and the one with “-delete” at the end, moves it to a specific folder.

For example, let’s say I have a folder with these files:
filenameA.jpg (23kb)
filenameA-delete.jpg (23kb)
filenameB.jpg (177kb)
filenameB-delete.jpg (98kb)

The file filenameA-delete.jpg would move to a specific folder, but filenameB-delete.jpg would NOT, because the size is 98kb while the original one is 177kb.

Basically I have close to 12k files, almost half of them have “-delete” at the end (that’s the part I messed up, because now I can’t see which ones have the exact same size and I don’t want to delete them by mistake, just because they have “-delete” at the end). They need to be an exact copy (same size), the only difference is that some have “-delete” at the end.

If this is something someone can help me with, I would be appreciate it SO MUCH!
I started going one by one, but this will take forever :frowning:

Thank you in advance!