I think you could easily program this in only a few lines in C or JAVA.
Ideal duty for a person who wants to learn to write programs.
Do not expect a ready-to-use app for such a specific task.
E.g.: I once wrote a program to put all pictures and icons in directories with
a name reflecting the picture size, like 48x48 for 48 square icons.
Lots of success.
;JOOP!