Modelbuilder: Moving the contents of a standard folder into a Geodatabase

10-07-2011 05:30 AM
New Contributor
I've recently run into an issue I haven't managed to solve and I thought someone with more modelbuilder experience than myself (which is just about everyone) may have a solution.

I recently put together a model that essentially takes a handful of shapefiles from a folder and moves them into a personal geodatabase. I'm utilizing the "Feature Class to Feature Class" tool, which cannot be the best method to get this done.

It works, but I have to set each shapefile as a parameter so when opening the tool the user has to navigate to and add each individual shapefile before running it.

Ideally, the user should only have to select a source folder and any shapefiles within it would be selected and transferred to the geodatabase without having to select each individual file. They would simply select the source folder and destination geodatabase.

I've experimented with using a list of values for the input, but that requires a selection of specific shapefiles. The contents of the folders will not be consistent so specifying file names is an issue.

Am I overlooking a tool that can simply dump the contents of a file folder into a geodatabase? Any advice is greatly appreciated!
0 Kudos
3 Replies
Esri Regular Contributor
IF you are at 10 try Iterate Feature Classes.

You can access the tool from Model>Insert>Iterators>Iterate Feature Classes
0 Kudos
Occasional Contributor III
I guess you got this working...but...another way is open ModelBuilder from ArcMap with all the shapefiles you want inside the table of contents; add a "create variable" shapefile [DO NOT click multivalue] click OK then RC>properties and select a list of values. You can select all the layers in ArcMap and drag and drop them into the variable...this works for me.

Using the feature-feature tool dumps converts the shapefiles to features classes and places them in the default geodatabase.
0 Kudos
New Contributor
Thanks for all the suggestions. I ended up using the feature class iterator in combination with the Feature Class to Geodatabase (multiple) tool and the model does exactly what I want it to do now. I'm really enjoying exploring the new iterators as they are going to save me from having to struggle with python scripting.
0 Kudos