According to the Help you should be able to use arcpy.da.Walk to loop through the mxd files in a folder (and subfolders): import arcpy import os workspace = r"D:\Xander\GeoNet" walk = arcpy.da.Walk(workspace, datatype="Map") for dirpath, dirnames, filenames in walk: for filename in filenames: mxdfile = os.path.join(dirpath, filename) ... but when I tried it didn't give me any result. However, you can use: import arcpy import os import fnmatch directory = r"D:\Xander\GeoNet" pattern = "*.mxd" for root, dirs, files in os.walk(directory): for filename in fnmatch.filter(files, pattern): mxdfile = os.path.join(root, filename) print "mxd file: {0}".format(mxdfile) mxd = arcpy.mapping.MapDocument(mxdfile) dfs = arcpy.mapping.ListDataFrames(mxd) for df in dfs: print " - data frame: {0}".format(df.name) for lyr in arcpy.mapping.ListLayers(mxd, data_frame=df): print " - layer name: {0}".format(lyr.name) ... to loop through the mxd's, the data frames and layers within the dataframes. To update any datasource I recommend you to read this page of the Help: ArcGIS Help (10.2, 10.2.1, and 10.2.2)
... View more