import arcgisscripting gp = arcgisscripting(9.3) gp.workspace = r"c:\WhereTheShapefilesLive" thelist_of_shapefiles = gp.ListFeatureClasses('*') sqlBit = '"Value" = 0' for each in thelist_of_shapefiles: layer = each[:-4] + "Layer" # slices off the '.shp' part of the name and adds suffix 'Layer' gp.MakeFeatureLayer_management (each, layer, sqlBit) gp.DeleteFeatures_management(layer)
import arcpy arcpy.env.workspace = r"c:\WhereTheShapesfileLive" thelist_of_shapefiles = arcpy.ListFeatureClasses('*') sqlBit = '"Value" = 0' for each in thelist_of_shapefiles: layer = each[:-4] + "Layer" arcpy.MakeFeatureLayer_management (each, layer, sqlBit) arcpy.DeleteFeatures_management(layer)
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.