I've got 65 layer files (both normal and group ones) that need their data sources changed. I got the following script to work for MXDs (which is good since there are several hundred):
HomerString = [list of mxds with paths] for bob in HomerString: mxd = arcpy.mapping.MapDocument(bob) mxd.findAndReplaceWorkspacePaths("WC-HOMER", "WC-HOMERB") NewString = bob.replace(r'\\WC-HOMER', r'\\WC-HOMERB') mxd.saveACopy(NewString) del mxd
But I cannot figure out any variation of it that will work for .lyr files
(and I did look at code snippets, help documents, and Google before posting here)
Any ideas or solutions out there?