I'm trying to use a script to batch clip all files in a folder, then saved with a _clipped.shp at the end of the original, I need a script that is something like this:
arcpy.env.workspace = "E:\\folder\\test_input" # Set local variables in_features = arcpy.env.workspace clip_features = "E:\\folder\\mask\\boundary.shp" out_feature_class = "_clipped.shp" # Execute Clip for f in arcpy.env.workspace arcpy.Clip_analysis(f, clip_features, f(name) + out_feature_class)
Where the f(name) 'points' to the orignal shapefile name and then 'appends' _clipped.shp at the end and then saves and performs this process iteratively for each file.
Also should I have a different output folder for the clipped features?
The reason I'm doing this is because the actual batch clip feature of the clip tool is not working for some reason.