import arcpy import os workspace = r"C:\test" for dirpath, dirnames, filenames in os.walk(workspace): for filename in filenames: if '.mxd' in filename: mxd = arcpy.mapping.MapDocument(os.path.join(dirpath, filename)) mxd.author = "Test GIS Author" mxd.title = "Test GIS Title" mxd.credits = "GIS Credits" mxd.save() del mxd
import arcpy import os workspace = r"C:\test" walk = arcpy.da.Walk(workspace, datatype="Map") for dirpath, dirnames, filenames in walk: for filename in filenames: mxd = arcpy.mapping.MapDocument(os.path.join(dirpath, filename)) mxd.author = "Test GIS Author" mxd.title = "Test GIS Title" mxd.credits = "GIS Credits" mxd.save() del mxd
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.