1

I have a shapefile which contains some features and I need to copy these features and paste them into an EXISTING feature class using ArcPy. I have tried the (arcpy.CopyFeatures_management(..)) but it seems it is used only to copy data from a shapefile to a NEW feature class.

import arcpy
input_ShapeFile ="C:\Users\Moh\Desktop\file.shp"
output_FeatureClass ="C:\Users\Moh\Desktop\Data.mdb\fc" 
arcpy.CopyFeatures_management(input_ShapeFile, output_FeatureClass)
...ERROR 000725: Output Feature Class: Dataset "C:\Users\Moh\Desktop\Data.mdb\fc"
 already exists. Failed to execute (CopyFeatures).

I am using ArcMap 10.5.

Kadir Şahbaz
78.6k57 gold badges260 silver badges407 bronze badges
asked Mar 26, 2020 at 19:07
0

1 Answer 1

1

I think that both your paths need to be turned into raw strings:

input_ShapeFile = r"C:\Users\Moh\Desktop\file.shp"
output_FeatureClass = r"C:\Users\Moh\Desktop\Data.mdb\fc" 

and, as commented by @BERA, try using Append (instead of Copy Features) which:

Appends multiple input datasets into an existing target dataset. Input datasets can be feature classes, tables, shapefiles, rasters, annotation or dimensions feature classes.

answered Mar 26, 2020 at 20:46
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.