import arcpy, os path = r"Z:\maps" for root, dirs, files in os.walk(path): for fileName in files: basename, extension = os.path.splitext(fileName) if extension == ".mxd": fullPath = os.path.join(root, fileName) mxd = arcpy.mapping.MapDocument(fullPath) mxd.findAndReplaceWorkspacePaths(r"Z:\maps\xyz.mdb", r"Z:\maps\cultural\xyz.mdb") newPath=os.path.join(r"Z:\maps\cultural\repaired_links", fileName) mxd.saveACopy(newPath) print mxd.dateSaved
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.