I am trying to repath multiple feature classes within an mxd. The new feature classes all come from various databases and folders but the only change in the file path is in the drive name. For example C:\features\points needs to be repathed to N:\features\points
I have read over this page: http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-mapping/updatingandfixingdatasources.htm but didnt see any examples pertaining to partial name changes.
This is what I have so far but I need some advice figuring out how to update part of the path without hard coding each new path.
import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") mxd.findAndReplaceWorkspacePaths(r"C:\features\points", r"N:\features\points") mxd.saveACopy(r"C:\Project\Project2.mxd") del mxd