You might be able to get Exiftool to do that with a script. Read the documentation to see if it is indeed possible.