I was hoping someone with better regex skills could help me with some files I need to rename. I need a command to recursively rename a large number of jpg files in Ubuntu.
However there are some problems. A normal group of files would look like
I need to replace all
_, remove all numbers and then add numbering which resets in every directory. So the same group of files should look like
ani_estate_villas_3.jpg and the same with the other files in the other directories.
The depth of the recursion is 1 or 2 directories deep, so you might find a
directory/directory/file.jpg it's pretty much random.
Running a command in every directory with jpgs is also doable so if anyone has any idea on how to rename all files with those characteristics would be fine. Although running one single command is cooler, I'd much appreciate a bit more repetitive solution, because manually changing the 400+ jpg files is too much.
I've tried tons of things but I'm not even close, not even worth it to put it here. I tried using krename but it deletes my files. So if someone could point me to the right direction I'd appreciate a lot!