Shortly, I'll be required to rename 22,000 .jpg files from imagereference.jpg to itemcode.jpg.
The rename itself isn't a problem, the issue lies with several thousand of the images are currently referenced numerous times, meaning I'll need to create a single image for each item code, for example...Item codes 755117, 755118, 755119 & 755120 all currently use a single .jpg (image reference cly123.jpg) as their image, whereas they all now need to have a .jpg each named with their individual item code.
While it's easy enough to manually dupliate cly123.jpg four times and rename them 755117.jpg, 755118.jpg, 755119.jpg and 755120.jpg, I have over 7,000 items codes referencing 2,700 images, and in a couple of cases, over 50 item codes all currently use the same image, so I'll need to duplicate the image another 49 times before I can rename them to the new itemcode.jpg
I have a list of all the item codes, and which image they currently reference - is there an easy way to automatically duplicate the images the required amount of times each as per the list, or am I going to have to bite the bullet and do them manually?