I am trying to develop a model in ModelBuilder that will allow for a number of polygon shapefiles to be paired with each other. Say a group of 3 shapefiles (1,2,3) located in the same folder would be processed producing individual shapefiles 1-2, 1-3, 2-3.

Is there a way to do this in ModelBuilder?

  • Thanks for your help. I do want to do this over many feature classes and I dont think modelbuilder will work. Python I think is the way to go for this. @nmpeterson
    – user6784
    Apr 12, 2012 at 23:06

3 Answers 3


Your problem is that ModelBuilder only allows for one iterator per model. For your use-case, you need two (like nested loops iterating your list of files in a program). You could try using an iterator as one input and setting the other input to a list/series but ModelBuilder doesn't always work the way you might expect. However this should be an easy task to code in ArcPy or the Python API for OGR.


The merge tool will do what you want. It could look something like below. Note that your field names need to be the same for all shapefiles in order for them to map correctly.

enter image description here

Hope this helps

  • I think his problem is that he doesn't necessarily know how many feature classes will be included, and that he wants to be able to essentially have this happen for every possible pair of shapefiles in a specified folder. That was how I understood the question, at least.
    – nmpeterson
    Apr 6, 2012 at 2:13

Two iterators nested in another model, which merges of joins the outputs of each of the iterators?

Or a nested iterator, with the 'inner' model and 'outer' model both iterating over the same list of data-sets. And then whatever tool is being used to 'pair' the two datasets in the outer model.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.