Thank you fernandokeber for your sugestion but I think the more complicated work would be to correlate the images to the coded ones not to rename them. For renaming the pictures there are several easier solutions.
Anyway, thank you for the response but I figured out that the "manual" approach will have faster and more accurate result.