AnsweredAssumed Answered

Changing path in layer file

Question asked by Tycho on Oct 13, 2016
Latest reply on Oct 14, 2016 by Tycho

I am sure I am missing something simple (I usually just steal code snippets and try to string them together). I want to change the data source path in a bunch of layer files (I will add in a for… loop once I get this to work). This is a simple layer file, I will also need to update Group layer files

def main():

if __name__ == '__main__':
import arcpy
#import string

arcpy.env.qualifiedFieldNames = False # Allow unqualified field names


lyr = arcpy.mapping.Layer(r"\\WC-HOMERB\Shared\GIS\Scratch\LayersForWilbur


lyr.findAndReplaceWorkspacePaths(r"\\WC-HOMERB\Shared\GIS\GeoDatabase", r"E:


and I get this error message: