Bitmap Rename

Hi,
I am looking for a piece of code to batch rename textures and inputs:
-batch change eg.map->CoronaMix, map->CoronaNormal, map->Output etc.
-map input name to texture name (it could be lowered case only)

many thanks for help