I have a folder with two level of subfolders inside it. Inside the second subfolder, there is a jpg file. All the jpg have the same name:
/home/user/folder001/folderAAA/cover.jpg /home/user/folder002/folderBBB/cover.jpg [...] /home/user/folder999/folderZZZ/cover.jpg
I need to find (and copy to a new folder) all
cover.jpg files and rename them adding to its filename (as prefix) the name of the first and second subfolder.
After the intended operation, the content ot
/home/user1/newfolder must be:
folder001_folderAAA_cover.jpg folder002_folderBBB_cover.jpg [...] folder999_folderZZZ_cover.jpg