I have dozens of point shapefiles I want to merge. First I used the Feature Classes Iterator and declared the iteration output as input for the merge tool directly, the problem was that it merged the output files with themselves and the result was only the last shapefile from the folder.

What I did next, was to use the Model Builder's Collect Values tool, it did the job just fine, but took so much time because the model collects and the merges all the input feature classes once for each input file. (For example, I have 30 point shapefiles, the model collects all those 30, 30 times, and then merges 30 times).

My question is, how can I make the collect and/or the merge tool run just once? The model works fine but it'd be way better if it was more efficient. The solution may be conspicuous and simple but I can't seem to figure it out.

Here's my model:

  • 2
    You place the iterator and the collects tool in a sub model. Expose the output of the collects tool as a parameter then drag that model into another model with just the merge tool and connect. Look at the help file for sub models. – Hornbydd Oct 25 '15 at 19:02
  • Much appreciated, that was just exactly what I was looking for. Thank you. – Abraham L Oct 26 '15 at 6:31