Hello,There are a lot of examples on the web on how to clip a lot of layers by a single feature class, and the python code would be more or less like below... But what happens when you want to clip each feature class in the input folder by more than one feature classs located for example in a "Clip_features" folder? Hor do you iterate at the same time over the input feature classes and the clip feature classes?
import arcgisscripting, sys, os
gp = arcgisscripting.create()
gp.workspace = "D:\inWorkspace"
clipFeatures = "D:\shape.shp"
outWorkspace = "D:\outWorkspace"
fcs = gp.ListFeatureClasses()
fcs.Reset()
fc = fcs.Next()
while fc:
outFeatureClass = outWorkspace + os.sep + fc.split('_')[0] + "_clip.shp"
gp.Clip_analysis(fc, clipFeatures, outFeatureClass, "")
fc = fcs.Next()
Thank you in advance,Bogdan