Here’s a production-ready wrapper:

Your file is now safely duplicated inside the /archive folder. 2. Copying and Renaming Simultaneously