import arcpy from arcpy import env # Loop through all MXDs in the specified folder and list layers in each MXD folderPath = r"mydata" env.workspace = folderPath maps = arcpy.ListFiles("*.mxd") # makes a list of maps in folderPath for map in maps: mxd_path = os.path.join(env.workspace, map) print mxd_path mxd = arcpy.mapping.MapDocument(mxd) lyrlist = arcpy.mapping.ListLayers(mxd) for lyr in lyrlist: print lyr.dataSource
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.