Hello there,
I am trying to changing an aprx file relative path to a UNC path.
I am using the following code, which is not working.
My idea is having a code that I could use for changing relative path to UNC path for other aprxs.
Any suggestions??
import arcpy, os, sys, string
folderPath= r"K:\Projects\TemporaryYM"
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() == ".aprx":
aprx = arcpy.mp.ArcGISProject (fullpath)
aprx.findAndReplaceWorkspacePaths (r"K:\Projects\TemporaryYM", r"\\ct\dfs11\D11Gis\Projects\TemporaryYM")
aprx.save()
del aprx