What I am trying to do is create a list of shapefiles based on field name values. From there I would like search on 1 field (each shapefile will only contain 1 row) and if the value in that field is greater than X have the code rename the shapefile. What I have so far is:
polyFCs = arcpy.ListFeatureClasses("*_Value.shp", "POLYGON") for polyf in polyFCs: field = "Area" with arcpy.da.SearchCursor(polyf, (field)) as cursor: for row in cursor: row.getValue(field) if field > X: arcpy.Rename_management(polyf, polyf.replace('.shp','') + "_NewValue")
When I run my code (and I'm pry missing or misunderstanding something) I get a runtime error stating 'A column was specified that does not exist'. I am in 10.1. Thanks for your help.