How does it know which folder the MXDs are in?
What if the MXDs are in a different folder than the GDB?
import arcpy, os # Set current workspace arcpy.env.workspace = os.getcwd() # For every mxd in the current directory for mxd in os.listdir(''): if mxd.endswith('.mxd'): print "Changing paths in "+mxd+"..." mxd = arcpy.mapping.MapDocument(mxd) # Note: Back slashes seemed to be required for it to work. mxd.findAndReplaceWorkspacePaths(r"c:\junk\fgdb\python\b.gdb", r"c:\junk\fgdb\python\a.gdb") mxd.save() del mxd
I need to change from one FGDB to another.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.