Select to view content in your preferred language

go through list of shapefiles and delete all but required fields - arcpy

6070
10
Jump to solution
01-28-2015 02:44 PM
BrendaJameson
New Contributor II

I have about 1000 shapefiles that I will be merging into one large shapefile. I am not interested in the attribute information, only the location. I was thinking I should try to condense the files before merging by stripping out all the fields except the required ones and them merging them all together, All the files should be polygons but a few non polygons may creep in so a check for file type would probably be nice. (I think I can code this requirement on my own).

Right now all the files are spread out in multiple directories but I have the file names and directory path listed in a txt file. I would want to copy all these files to a single location, delete the unnecessary fields and then merge. I want to do this all at once instead of each file individually. I know how to code this individually but am unsure how to accomplish this with such a large volume of data. Ideas anyone?

ver. ArcGIS 10.2.1 Advanced

0 Kudos
10 Replies
curtvprice
MVP Esteemed Contributor

I think I have a simple approach: create a empty shapefile in the coordinate system you want and use the Append tool with NO_TEST. This will ignore all fields that do not have a name match to the output shapefile.

0 Kudos