Find and replace file

This is what I'm currently after:
https://snipboard.io/nyckwm.jpg
Basically, I will have the same file in folder A and folder B, and the folders will have different structures. I want to look for file-1 in folder A, and replace it with file-1 from folder B. So folder B always has the better file - in this case higher res video - and folder A is the main folder. I'd love the script to just find one file at a time from folder B and move and replace the same file in folder A.
I've trailed the boards, but can't quite find a solution, so hoping to find something as a new thread.
https://snipboard.io/nyckwm.jpg
Basically, I will have the same file in folder A and folder B, and the folders will have different structures. I want to look for file-1 in folder A, and replace it with file-1 from folder B. So folder B always has the better file - in this case higher res video - and folder A is the main folder. I'd love the script to just find one file at a time from folder B and move and replace the same file in folder A.
I've trailed the boards, but can't quite find a solution, so hoping to find something as a new thread.