@@ -0,0 +1,782 @@
+# ExtactFeaturesByLocationAndAttribute.py%0A# Description: Extract features to a new feature class based on a Location and an attribute query%0A# Requirements: Python and the Python win32all extension%0A# Author: ESRI%0A# Data 1/1/2004%0A# modified from the above 10/1/2004 by percy%0A#updated to ArcMap10 January 2012%0A%0A# Create the Geoprocessor%0Aimport arcpy%0A%0Aarcpy.env.overwriteOutput = True%0A%0A# Put in error trapping in case an error occurs when running tool%0Atry:%0A    # copy just the features that have class 1%0A    arcpy.FeatureClassToFeatureClass_conversion(%0A        %22c:/temp/percy/San_Diego/majorrds.shp%22,%0A        %22c:/temp/percy/%22, %22bigrds.shp%22,%0A        %22%5C%22CLASS%5C%22 = '1' or %5C%22CLASS%5C%22 = '2'%22)%0Aexcept:%0A    # If an error occured print the message to the screen%0A    print arcpy.GetMessages()    

add base script to parameterize, further customize