How to combine multiple shapefiles of same name into fgdb

7012
14
03-06-2016 05:38 PM
TerryWatson
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

0 Kudos
14 Replies
AdrianWelsh
MVP Honored 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

0 Kudos
TerryWatson
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

0 Kudos
AdrianWelsh
MVP Honored 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!

0 Kudos
TerryWatson
New Contributor II

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

--Terry

0 Kudos
WesMiller
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

TerryWatson
New Contributor II

Hi Wes,

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

--Terry

0 Kudos
AdrianWelsh
MVP Honored Contributor

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

0 Kudos
TerryWatson
New Contributor II

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

--Terry

0 Kudos
AdrianWelsh
MVP Honored 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)?

0 Kudos