Solved! Go to Solution.
import arcpy fc = "D:\\2010.shp" yrs = [1991,1992,1996,1998,1999,2000,2003,2004,2005,2006,2008,2010] subtract = '' for yr in yrs: where = '"Year" <= ' + str(yr) + subtract subtract = ' AND "Year" > ' + str(yr) filename = str(yr) + '.shp' arcpy.FeatureClassToFeatureClass_conversion(fc, "D:\\test output", filename, where)
import arcpy fc = "D:\\2010.shp" yrs = [1991,1992,1996,1998,1999,2000,2003,2004,2005,2006,2008,2010] subtract = '' for yr in yrs: where = '"Year" <= ' + str(yr) + subtract subtract = ' AND "Year" > ' + str(yr) filename = str(yr) + '.shp' arcpy.FeatureClassToFeatureClass_conversion(fc, "D:\\test output", filename, where)