I try to merge 20 shapefiles in order to get one shapefile that include all the features. All shapefiles are called "migrashim", and they spread in big folder that divided to a lot of sub folders. My code is:
import arcpy,os,sys,string,fnmatch import arcpy.mapping from arcpy import env rootPath = 'C:\Project\layers' pattern = 'migrashim.shp' counter = 0 for root, dirs, files in os.walk(rootPath): for filename in fnmatch.filter(files, pattern): print( os.path.join(root, filename)) arcpy.Merge_management(["migrashim.shp"], r"C:\Project\layers\migrashim_total.shp") counter = counter + 1 print counter
and i get an error:
ERROR 000732: Input Datasets: Dataset migrashim.shp does not exist or is not supported Failed to execute (Merge).