I have many folders of images, and I want to create a batch file that can look through all these directories and their subdirectories, and copy every image to a single new folder (all files in the same folder). I have this working using the below:
md "My new folder"
for /D %i in (*) do copy "%i\*" ".\My New Folder"
however, I also want to keep files with duplicates (for example if folder1 and folder2 both have images called 001.jpg, i want both copied to the new folder). It doesn't matter to me what the new filenames are! Having:
001.jpg
001(1).jpg
001(2).jpg
would be great, but even just renaming every single file with an incremental count and ending up with:
1.jpg
2.jpg
3.jpg
etc
would be fine too. I need it just using a standard .bat/.cmd file though, no external software.
Thanks for your help!