Solved! Go to Solution.
import arcpy import glob import os # Provide folder path to loop through (first level only) folderPath = r"C:\TEMP\test" for filename in glob.glob(os.path.join(folderPath, "*.mxd")): print "Editing", filename mxd = arcpy.mapping.MapDocument(filename) if not mxd.description: mxd.description = "Default description" mxd.save() del mxd
import arcpy import glob import os # Provide folder path to loop through (first level only) folderPath = r"C:\TEMP\test" for filename in glob.glob(os.path.join(folderPath, "*.mxd")): print "Editing", filename mxd = arcpy.mapping.MapDocument(filename) if not mxd.description: mxd.description = "Default description" mxd.save() del mxd