I have 640 files in the following form
string02_01.ext, string02_02.ext, string02_03.ext ...
I need to rename all of them so that every 40 items it changes pattern, for instance
first 40s: a0b0c0.ext, a1b0c0.ext, a2b0c0.ext ...
second 40s: a0b1c0.ext, a1b1c0.ext, a2b1c0.ext ...
third 40s: a0b2c0.ext, a1b2c0.ext, a2b2c0.ext ...
fourth 40s: a0b3c0.ext, a1b3c0.ext, a2b3c0.ext ...
What would be a good way of doing this? Any ideas will be appreciate it.
Thanks in advance
a00b00c00.ext ... a39b15c00.ext