Help: Merging several shape files from a geodatabase

Discussion created by zia207 on Aug 16, 2011
Latest reply on Dec 18, 2013 by lukemac
I am trying to merge several shape files (county)  from a geodatabase to create  a shapefile for  a state. I tryed following script - but it is not working.I am using ArcGis 10. Help will be appreciated. Thanks

# Script:

import arcpy, os
## Set the workspace
arcpy.env.workspace= "K:/COUNTY_MUKEY/test.gdb"

fcs = arcpy.ListFeatureClasses()

# Create the multi-value string for the Analysis Union tool
# Get the first feature class name and set the string variable
fc = fcs.next()
inputs = fc
# Get the next name and start the loop
fc = fcs.next()
while fc: # While the fc name is not empty
    inputs = inputs + ";" + fc
    fc= fcs.next()
print inputs
    # Process: Merge...
    arcpy.Merge_management(inputs,"K:/STATE_ MUKEY/REA.gdb/soilmu_in")
    print "finished"
    print "error"
    print arcpy.GetMessage()
    del arcpy

# Error
Traceback (most recent call last):
  File "K:\Script\Python_Script\merge_shape.py", line 12, in <module>
AttributeError: 'list' object has no attribute 'reset'