Replacing outline colors in batch?

I need to replace the outline colors in a large batch of files, from one set of RGB values to another.

I also need to do the same for a large batch of WMF files.

Is there a script or application that I can use to achieve this?