I uploaded a bunch of images using wget, and unfortunately there was a huge flaw ...
Uploaded images have the same name! So the script is automatically added .1, .2, ... etc. in the end:
Accept-Male-User-icon.png Accept-Male-User-icon.png.1 Accept-Male-User-icon.png.2 ...
So, I'm looking for a script that will take these files and rename them according to their size, given that their size can be one of the following:
(256x256, 128x128, 64x64, 48x48, 32x32, 16x16)
So, I get something like this:
Accept-Male-User-icon256.png Accept-Male-User-icon128.png Accept-Male-User-icon64.png ...
Thanks!!
source share