When I run script after correction, I get error again.
Thanks
import arcpy, os
#
arcpy.env.workspace= "K:/SUURGO_Data/IA"
#
# To create list files from directories and subdirectories
for root, dirs, files in os.walk(arcpy.env.workspace):
for name in files:
if name.startswith("soilmu_a_") and name.endswith(".shp"):
path = os.path.abspath(os.path.join(root, name))
# Remove the path from the shapefile name
base = os.path.basename(path)
print "Processing "+base
# CopyFeatures
arcpy.CopyFeatures_management(path, "K:/COUNTY_MUKEY/IA.gdb"+base.rstrip(".shp"))
print arcpy.GetMessages()
#############
Processing soilmu_a_ia001.shp
Traceback (most recent call last):
File "K:\Script\Python_Script\ImprtFetureGeodatabase_1.py", line 21, in <module>
arcpy.CopyFeatures_management(path, "K:/COUNTY_MUKEY/IA.gdb"+base.rstrip(".shp"))
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 1943, in CopyFeatures
raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000725: Output Feature Class: Dataset K:\COUNTY_MUKEY\IA.shp already exists.
Failed to execute (CopyFeatures).