noydb

Copy GP Tool used in Python

Discussion created by noydb on Feb 20, 2012
Latest reply on Feb 21, 2012 by Hornbydd
I am trying to use the Copy GP tool in desktop and in a Python script to copy feature datasets, but cannot get it to work either way.  Very frustrating!  What's the quirk here?  If I select a feature dataset in a file GDB in catalog and click copy, and then past it into another file gdb, all works fine.  This is what I want to do.  But, I need to script this process, thus need to use the GP tool Copy.  I'm trying umpteen things, just not getting there at all.  It might work once, but then to repeat it is impossible.  Is there a better way to do?  Any help would be greatly appreciated!!

v10 sp3

import arcpy, os

inFDS = "C:\\Temp\\testing.gdb\\sunday"
outFDS = "C:\\Temp\\testing_copied2.gdb\\sunday"

# Declare workspaces
inWorkspace = os.path.dirname(inFDS)
outWorkspace = os.path.dirname(outFDS)

arcpy.env.workspace = inWorkspace
   
arcpy.Copy_management(inFDS, outFDS, "FeatureDataset")




error messages are not helpful, maybe this one, but...
"While using the Copy tool, the input could not be successfully copied to its new location. This error typically occurs while copying data from one location to another.

The "in_memory" workspace is not supported as the output location."

Outcomes