Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have got a python to update a file geodatabase (*.gdb).

Every time the code executes, it needs to check if a certain layer has been already there in the previous geodatabase; if so, delete it and create a new one; otherwise, overwrite it with a new one.

I am just wondering if I can achieve this by ArcToolBox or a python code?



share|improve this question
Can we see your code so far? What you describe sounds straightforward, using Python if statement with arcpy.Exists and arcpy.CreateFeatureclass_management, so it would be useful to see where you are stuck. – PolyGeo Jul 23 '12 at 6:30
up vote 2 down vote accepted

What you describe sounds straightforward with ArcPy.

Use a Python if statement with arcpy.Exists and arcpy.CreateFeatureclass_management.

share|improve this answer

Your Answer


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.