Updating Component Location

I had changed the way my file management system was set up which included moving every SolidWorks file to a new location.  Because of this, when I open assemblies, the components cannot be found.  I've created a macro that reads the names of the selected components and builds a string of the location of where the part has been moved to.  I use ReplaceComponents method which works 25% of the time.  My guess to why it doesnt work is because the components can't be replaced with ones that have the same name, but I'm not sure why it works some of the time.  Is there a better way of doing this?

SolidworksApi macros