This worked well when going from FGDB to FGDB on same server, now I am attempting to use the same process to go from SDE to FGDB on a different server.
I have no syntax errors, no errors are returned, I run the script, it runs, but way too fast to have done anything, so I am curious if anyone can see where I may be going wrong.
I think it has to be a workspace issue, but cannot figure out. Here is the code: was not sure how to put code into its own window within this message
# Import system modules
import arcpy
from arcpy import env
import os, sys, traceback
# Set environment settings
arcpy.env.workspace = r"Database Connections\\COL_LCT_SDEOWNER.sde\\"
##arcpy.env.overwriteOutput = True
# Set local variables
outpath = r"I:\\ROBOTEST.gdb"
pre = 'COL_LCT_SDE.'
# Copy feature datasets to new FGDB
try:
fdList = arcpy.ListDatasets("*","Feature")
fdcopy1 = pre + 'ManagedData'
fdcopy2 = pre + 'PublicWorks'
fdcopy3 = pre + 'Annotation'
fdcopy4 = pre + 'TCA'
fdcopy5 = pre + 'ReferenceData'
for fd in fdList:
pastefd = outpath + os.sep + str(fd)
if fd == fdcopy1:
arcpy.Copy_management(fd, pastefd)
if fd == fdcopy2:
arcpy.Copy_management(fd, pastefd)
if fd == fdcopy3:
arcpy.Copy_management(fd, pastefd)
if fd == fdcopy4:
arcpy.Copy_management(fd, pastefd)
if fd == fdcopy5:
arcpy.Copy_management(fd, pastefd)
except:
arcpy.AddError(arcpy.GetMessages(2))
del fdList