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
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.