Reassociate ripped configurations

Someone, many moons ago, at my company thought having a single O-rings file was a clever idea.  Now, in order to clean my world up I've ripped the O-rings.sldprt file into the individual configurations, each of which conveniently has my companies part number for the configuration name, and now file name.  Is it possible to use the API to reassociate anywhere an assembly calls for O-rings <12345> with 12345.sldprt?  We have hundred of assembly, and literally thousands of instances of O-rings and neither my boss nor I want me to have to do it completely manually.  Thanks in advance.

SolidworksApi macros