I have managed to do this manually at Geoprocessing>Environments>Processing Extent and setting the shapefile in the drop down bar.
I was wonder if this could be automated with a python script?
My goal is to create a loop to change the processing extent prior to using spatial analysis tools on a various rasters that represent the areas of the shapefiles. This will keep their extent size minimal.
Edit (Current Code): (Not working)
for i in range (31): ... arcpy.env.extent = (r"C:\Folder\Shapefile"+str(i)+".shp")
Receiving a runtime error stating "Error in accessing environment "