import arcpy
# Set workspace for listing
arcpy.env.workspace = r"T:\chastain\PrgGIS\World"
# Get a list of all feature classes
fcs = arcpy.ListFeatureClasses("*")
# Loop through the list
for fc in fcs:
#print names
print("These feature classes are in the World folder", fc)
Output = fc + "Buff"
arcpy.Buffer_analysis(fc, Output, "100 Meters")
ERROR 000670: output Output Feature Class is same as input Input Features
Failed to execute (Buffer).
Hey you're very welcome Johnny. Two final points:
1. dependant on the buffer distance you may want to consider a "GEODESIC" buffer to preserve true distance.
2. Buffering country sized polyline data is extreeeeeemely processing intensive
Ok, update...Found the Country shapefile to be corrupted, thank you for your help. here is my final script
import arcpy,os
# Set workspace for listing
arcpy.env.workspace = r"T:\chastain\PrgGIS\World"
# Get a list of all feature classes
fcs = arcpy.ListFeatureClasses("*")
# Loop through the list
for fc in fcs:
fc_path = os.path.join(arcpy.env.workspace, fc)
#print names
print("These feature classes are in the World folder", fc)
Output = r"C:\Users\johnny.monds\Desktop\Test" +fc[:-4] + "_Buff.shp"
arcpy.Buffer_analysis(fc, Output, "100 Meters", "FULL", "ROUND", "ALL")