Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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, any help on this is most welcome, thanks

P.S: 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

share|improve this question
    
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 '13 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 '13 at 15:58
add comment

1 Answer 1

up vote 3 down vote accepted

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")
share|improve this answer
    
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 '13 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 '13 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 '13 at 17:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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