I have a set of files that got extracted into their own subfolders. I'd like to move all these files to the parent folder, but each of the files has the same name (the folder has the unique name), so I'd like to see if I can rename all the files based on the name of the folder they're in and then move them all to the root folder. Is this even possible?
Example:
I current have...
/blue/file001.jpg
/red/file001.jpg
/yellow/file001.jpg
and I want to have...
/blue.jpg
/red.jpg
/yellow.jpg
Each folder only has the one file inside it and they all share the same root folder.