Hallo,
I want to add fields to all my shapes in a folder. I want to use a script for this.
I was looking at the forum and I found something I can use.
http://forums.arcgis.com/threads/618...es-in-a-folder
I am trying but cannot seem to get it to work.
This is my script and I have it in a .py file. In the folder GIS I have a subfolder TEST with 3 shape files in this subfolder I have also 3 shape files. I want to add multiple fields (“width” “length” “height” “code” “max_ton” “ecc” to all shape files.
import arcpy
inFolder = r"C:\GIS"
arcpy.env.workspace = inFolder
l = arcpy.ListFeatureClasses()
for i in l:
arcpy.AddField_management(i, "width", "DOUBLE")
Hope someone can help me again.
Greetings Peter
I want to add fields to all my shapes in a folder. I want to use a script for this.
I was looking at the forum and I found something I can use.
http://forums.arcgis.com/threads/618...es-in-a-folder
I am trying but cannot seem to get it to work.
This is my script and I have it in a .py file. In the folder GIS I have a subfolder TEST with 3 shape files in this subfolder I have also 3 shape files. I want to add multiple fields (“width” “length” “height” “code” “max_ton” “ecc” to all shape files.
import arcpy
inFolder = r"C:\GIS"
arcpy.env.workspace = inFolder
l = arcpy.ListFeatureClasses()
for i in l:
arcpy.AddField_management(i, "width", "DOUBLE")
Hope someone can help me again.
Greetings Peter