I have a lot of *.jpg files with the wrong name, and each file,
is in a folder with the correct name.
what I want to achieve is to rename all the *.jpg files
with the name of the folder
[folder] [file ] [new file name]
AAA 111.jpg --->AAA.jpg
BBB 222.jpg --->BBB.jpg
CCC 333.jpg --->CCC.jpg