Using ArcGIS 10.2 Desktop I am trying to run a Merge function by Arcpy as

# Set environment settings
env.workspace = "E:\\GIS\\ROR"

path = "E:\\GIS\\Data\\"
featureClass = "band-tailed_pigeon.shp"
InputFeature = path + featureClass
FinaloutLocation = "E:\\GIS\\Data\\Final"

dissolve_1 = "dissolved_1.shp"
dissolve_2 = "dissolved_2.shp"
dissolve_3 = "dissolved_3.shp"
dissolve_4 = "dissolved_4.shp"
dissolve_5 = "dissolved_5.shp"
# Process: Merge
inFeaturesToMerge = [dissolve_1,dissolve_2,dissolve_3,dissolve_4,dissolve_5]
arcpy.Merge_management(inFeaturesToMerge, FinaloutLocation)

but I am getting this error:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000725: Output Dataset: Dataset E:\GIS\Data\Final already exists.

Can you please let me know why this is happening?


The message is telling you that Dataset E:\GIS\Data\Final already exists.

However the output from Merge should be a feature class or table instead of a folder name so as a test try setting:

FinaloutLocation = "E:\\GIS\\Data\\Final\\test.shp"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.