import arcpy import os mainLoc = r"c:\testing" outputLoc = r"c:\finalLocation\Output.gdb" #Note: ouput location should be outside the "testing" folder or additional runs will include any previously generated output FCList = [] for dir in os.listdir(mainLoc): arcpy.env.workspace = dir FCsubList = arcpy.ListFeatureClasses("*_CadastralPolygons.shp", "Polygon") FCList.append(FCsubList) arcpy.Merge_management(FCList, outputLoc)
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.