I need to rename all image files in a directory, and name them whatever the folder they are in is called... Is this possible using a Bash script?
I also need to number them (0001.jpg, 0002.jpg, 0003.jpg, ect...) consecutively. The problem I'm having is that there are some jumps between the numbers.. (0018.jpg, 0019.jpg, 0025.jpg, 0026.jpg, ect...) I'd like to rename the 0025.jpg to be 0020.jpg and the 0026.jpg to be 0021.jpg ect...