Working with ArcGIS Desktop 10.5.1
I have a simple Python script to export all feature classes in a specific feature data set to a shapefile. It works, but it appears to duplicate the feature classes while exporting.
For example for 1 FC it produces 27 shapefiles of the same data and appends "_XX" after the name (XX is the number of duplicates)
My code is below... No idea why this is occurring, and it's 27 duplicates every time.
import arcpy arcpy.env.workspace = r"Database Connections\Database.sde\path_to_Feature_dataset" arcpy.env.overwriteOutput = True rawOut = r"Y:\output folder path" inFeatures = arcpy.ListFeatureClasses() for feature in inFeatures: print "Exporting " + str(feature) arcpy.FeatureClassToShapefile_conversion(inFeatures, rawOut) print str(feature) + " Export complete! \n"