The below works great on MXDs nested directly in a folder, but how do you walk through all the files in folders in the folder?
import arcpy, os
folderPath = r"myfolderpathhere"
for filename in os.listdir(folderPath):
fullpath = os.path.join(folderPath, filename)
if os.path.isfile(fullpath):
basename, extension = os.path.splitext(fullpath)
if extension.lower() == ".mxd":
mxd = arcpy.mapping.MapDocument(fullpath)
mxd.findAndReplaceWorkspacePaths(r"mybeginningoldfoldeepath", r"mybeginningnewfolderpath")
mxd.save()
del mxd