There is a command line program called exiftool that will let you read and write IPTC and EXIF data. It's not the simplest thing in the world, and I use it more for extracting data or making sure it's present than I do to change the data, but that's one of its capabilities. As an example, here is how I take a stock image and use exiftool to find the filename of the original RAW file:
exiftool -RawFileName 47018.jpg
Raw File Name : DSC_7844.NEF
exiftool is a command line wrapper for a set of code written in Perl. It's free, but I'd recommend you find someone with command line experience to help you with it.