Could someone check this script and tell what is not working, I'm receiving ERROR 000735 which stands for a required parameter that has not been used by the tool. I'm trying to several shapefiles found in folder Merge into a single shapefile. Using another simpler method it works but for that I have to specify location of each shapefile which isn't quite efficient.
import os import arcpy from arcpy import env env.workspace = "D:/M1 Geomatique/Programmation II/Dossier/Merge" fc = arcpy.ListFeatureClasses(env.workspace) output = "D:/M1 Geomatique/Programmation II/Dossier/zones.shp" arcpy.Merge_management(fc, output)
Solved! Go to Solution.
The first parameter for ListFeatureClasses is a wildcard, so it is searching for a feature class equal to your workspace path. Try:
fc = arcpy.ListFeatureClasses()
The first parameter for ListFeatureClasses is a wildcard, so it is searching for a feature class equal to your workspace path. Try:
fc = arcpy.ListFeatureClasses()
That's right, it worked. I just check the documentation for ListFeatureClasses and that's true. What a foolish mistake on my part.
Many thanks, Darren.