in reply to file compare and renaming
I really like my foot. Nothing beats it for walking around on, so I try to keep it in good shape. In this case ... having determined for some reason that I did not want to “just do it by hand and be done” for a mere 40 files ... :-/ ... I would write the script to copy the files from one directory into another, renaming them as it went. (I would begin the script methodically, first merely printing the old and new names to be used, etc.) But I would never rename or otherwise touch the original files.
When I know that I am dealing with precious and irreplaceable things, I always want to construct a fully repeatable process. I would run the script, perfect it, empty the target directory, run it one more time ... then neatly tuck the original directory away just as it originally was and fuhgeddaboudit. (Disk space is cheap; data isn’t.)