如何更改 MXD 项目中图层的部分路径

How to change part of the pathes to layers in a MXD-project

如何更改 MXD 项目 (ArcMap) 中图层的部分路径并在新项目中保存更改?

import arcpy, os

def changeMXDFile(fullPath):
    nameWithPath, extension = os.path.splitext(fullPath)
    if extension.lower() == ".mxd":
        mxd = arcpy.mapping.MapDocument(fullPath)
        mxd.findAndReplaceWorkspacePaths(u"\10.64.68.36\j\folder\", u"\10.64.68.36\j\f\folder\")
        outputFile = os.path.join(outputFolder, os.path.basename(nameWithPath) + ".mxd")
        mxd.saveACopy(outputFile, "10.3")
        arcpy.AddMessage("file " + os.path.basename(nameWithPath) + ".mxd is change")
        del mxd

if __name__ == '__main__':
    inputFolder = arcpy.GetParameterAsText(0) #folder with input files mxd 
    outputFolder = arcpy.GetParameterAsText(1) #folder with output files mxd
    for fileName in os.listdir(inputFolder):
        fullPath = os.path.join(inputFolder, fileName)
        if os.path.isfile(fullPath): changeMXDFile(fullPath)