How to combine multiple shapefiles of same name into fgdb

4940
14
03-06-2016 05:38 PM
Highlighted
New Contributor II

I am trying to combine multiple shapefiles into a file geodatabase.

The shapefiles are in separate folders with same filenames and attribute fields.

I have tried combining but i get a gdb with separate filenames (ie. shape1, shape2, shape3 etc.).  Im downloading these datasets in pieces, and would like to reassemble all of them into one gdb file and layer.

Attached is a sample of what I want to combine. The folders are differnt names, but the shapefiles are all the same. I need a workflow to combine these, plus append new files as I download them.

--Terry

Reply
0 Kudos
14 Replies
Highlighted
MVP Notable Contributor

Hi Terry,

Could you copy one of your shapefiles over to the geodatabase and then use the Append—Help | ArcGIS for Desktop tool to append the other datasets into your current one? Do you have many that you are working with?

If not that then, export the first shapefile into your gdb and then open that gdb feature class in an Edit Session and just copy and paste the other shapefiles into the Editing layer. Does that make sense?

I did not see an attachment for your first post.

Cheers,

Adrian

Reply
0 Kudos
Highlighted
New Contributor II

Thanks, I will try...edited post...should see attachment now

Append gives me an error - TEST says schemas dont match and NO TEST fails also

I would be happy with being able to combine shapefiles with the same name (ie. DML - Department Misc Lease.shp ) into one shapefile

--Terry

Reply
0 Kudos
Highlighted
MVP Notable Contributor

There is probably some kind of easy iteration thing to do in order to get all of this to behave the way you want, but I cannot think of it right now. This may be tedious, but this is what I would do since there isn't a ton of data.

For the first extract folder, export it all into a geodatabase (from ArcCatalog, create a new file gdb and import multiple shapefiles and grab them all from that folder). Then add all those feature classes into ArcMap. Then for each subsequent extract folder, load the shapefiles into the same ArcMap instance, start an edit session for the original gdb features, and copy and paste the shapefiles into the gdb.

I hope that makes sense and it's too bad that Append didn't work. I'm sure someone else on here (likely tomorrow) would have a better and more appropriate answer involving a geoprocessing tool and maybe some iterations. Either way, good luck!

Reply
0 Kudos
Highlighted
New Contributor II

Thanks for your help...I cant figure it out either...will keep trying a few things tho

--Terry

Reply
0 Kudos
Highlighted
Regular Contributor III

Have you tried the Merge—Help | ArcGIS for Desktop  tool. If they are all the same format you should be able to combine them into one, you may have to rename the files so they all don't have the same name. Seems I read something a while back were having files with same name was an issue.

Edit:

You may also be interested in About loading data in ArcMap—ArcGIS Help | ArcGIS for Desktop

Highlighted
New Contributor II

Hi Wes,

I tried Merge but I didnt get the results i needed.

--Terry

Reply
0 Kudos
Highlighted
MVP Notable Contributor

Before merging, were all of your shapefiles exported into your geodatabase? This may have to happen first.

Reply
0 Kudos
Highlighted
New Contributor II

Yes I have done that...Merging returns an error

--Terry

Reply
0 Kudos
Highlighted
MVP Notable Contributor

What kind or error are you getting? And have you tried just copying and pasting (from the shapefile layer into your file gdb layer)?

Reply
0 Kudos