Fairly new to python, trying to update the data paths for several dozen MXD files to a new computer that doesn't have the "B" drive of the author.
Does the physical\logical data drive have to actually exist on the new computer, for python to reassign using "mxd.findAndReplaceWorkspacePaths" (say if the MXD references a B: drive, do I need to worry that my data is on the F: or C: drive?
I have a fairly simple script, that I keep getting syntax errors on:
import arcpy mapdoc = arcpy.mapping.MapDocument("CURRENT") mapdoc.findAndReplaceWorkspacePaths("<the directory you are changing from>" , "<the directory you are changing to>") mapdoc.save() del mapdoc
Using: ArcGIS 10.3.1
Pseudo paths look like:
from directory: "B:\Data_Directory\My Maps & Data\GIS_GDB_Layers\" to directory "C:\GIS_GDB_Layers\"
error: Parsing error SyntaxError: invalid syntax (line 1)
I don't have a B:\ drive on my computer- apparently the person who forwarded the data & MXDs did.