So I have a list of directories and sub directories with images in them. I need to get then names of all of these files in the same format and I need to edit them for duplicates or images that are from different angles (ie the back). Lets say they are all in
C:\Users\username\Desktop\a........
For example I have an image in:
C:\Users\username\Desktop\a\123\123.jpg
C:\Users\username\Desktop\a\123\back\123.jpg
I want them all to be in C:\Users\username\Desktop\a\ but I want to keep both the back and the front images. I have found dozens of scripts that will move or "flatten" these files into one folder but it always asks to overwrite the image. Is there a way to have it keep the second file and add the 123 (1).jpg like the normal copy function? Or maybe even insert "back" inside of the filename for duplicated? It also doesn't just stop with \back I also have \options folder.
So can I use part of the path name to name the file? So if it has \back in it can I add that to the filename string? Same thing with \options?
So for C:\Users\username\Desktop\a\123\back\123.jpg, I would want:
C:\Users\username\Desktop\a\123.123.jpg
C:\Users\username\Desktop\a\123.back.123.jpg
C:\Users\username\Desktop\a\123.options.image1.jpg
C:\Users\username\Desktop\a\123.options.image2.jpg
I would prefer a batch script to do this, but honestly I will work with PHP, JS, Ruby, anything I don't have to compile. :) Greatly appreciate any help given.