I have 30000 shapefiles (a1.shp to a30000.shp). They are all polygons. Each polygons has one and only one polygon feature in it. I need to Merge* (what ESRI consider a merge) the polygons into 1000 shapefiles. My output would be 1000 polygons (each with 30 sequential polygons in it)

So output b1.shp = Merged polygons a1.shp to a30.shp

So output b2.shp = Merged polygons a31.shp to a60.shp

So output b3.shp = Merged polygons a61.shp to a90.shp

and so on up to...


b1000.shp = Merged polygons a29970.shp to a30000.shp

Looking for an ArcGIS model builder or GDAL solution.

*http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000055000000