Your request is in conflict with the title of your topic:
Keep both files when moving a file to a folder
So, do you want to Replace OR Keep Both files?
Are you looking to automate selection of the proper button, OR do you want a Macro that will do the entire operation?
Please read:
Tip: How Do I Get The Best Answer in the Shortest Time?