1

I want top create a new file geo-database using python, which I am able to do using arcpy.CreateFileGDB_management(Fpath,"TestGDB","10.0")

But I want to transfer all data from an existing File geodatabse in ArcGIS 9.3 to this newly created geodatabase, what is the best way to do so using python?

I used CopyFeatures_management(r"\Servername\Datafolder\Test.gdb","C:/Test/TEstGDB2.gdb") but it gives me an error stating ERROR 000732: Input Features: Dataset\Servername\Datafolder\Test.gdb does not exist or is not supported

2
  • I don't think you are going to be able to copyfeatures using the database name. It is probably looking for either a feature dataset name or a feature class name. you would then have to repeat for each feature class.
    – Brad Nesom
    Aug 26, 2013 at 19:06
  • Hi brad, thanks for the reply, yes I think you are right it works this way, isnt there a way to copy all the whole file geodatabase all together like an extract function?
    – GBh
    Aug 27, 2013 at 15:58

1 Answer 1

3

I would recommend that you copy the geodatabase first

arcpy.Copy_management(r"\Servername\Datafolder\Test.gdb", "C:/Test/TestGDB2.gdb")

and then upgrade the geodatabase

arcpy.UpgradeGDB_management("C:/Test/TestGDB2.gdb", "PREREQUISITE_CHECK", "UPGRADE")
3
  • Hi , thanks for the reply, I dont think it works this way I tried it, Copy_management still expects a feature class to feature class transfer
    – GBh
    Aug 27, 2013 at 15:59
  • @GBh Copy and Copy Features (which you used in your question) are very different. Copy works with basically anything. If you really are having trouble with Copy, try adding "Workspace" as a third argument.
    – nmpeterson
    Aug 27, 2013 at 16:26
  • Thanks yeah it works using the copy_management, it creates a new GDB, copies everything including projection. Thanks a lot
    – GBh
    Aug 27, 2013 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.