I'm looking to update a bunch of file references in MXDs througout a directory and all included subdirectories. This is a project I've been delaying until the ArcPy module was available, but now that it's here I'm having an issue getting it to work with those pesky subdirectories.In the ArcGIS 10.0 help file, there is this topic regarding the Python FindAndReplaceWorkspacePath function. I'm looking to tweak this code (example 2 from that referenced link)...import arcpy, os
folderPath = r"C:\Project"
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"C:\Project\Data", r"\\ComputerName\Project\Data")
mxd.save()
del mxd
This code only seems to work for C:\Project and does not touch any MXDs in subdirectories.How can I tweak this to include subdirectories in the process?