Copy (Data Management)—ArcGIS Pro | Documentation (2024)

Summary

Makes a copy of the input data.

Usage

  • If a feature class is copied to a feature dataset, the spatial reference of the feature class and the feature dataset must match; otherwise, the tool will fail.

  • Any data that is dependent on the input is also copied. For example, copying a feature class or table that is part of a relationship class also copies the relationship class. This also applies to a feature class that has feature-linked annotation, domains, subtypes, and indices—all are copied along with the feature class. Copying geometric networks, network datasets, and topologies also copies the participating feature classes.

  • This tool does not copy layers, since a layer is only a reference to a feature class.

  • Copying a mosaic dataset copies the mosaic dataset to the designated location; the images referenced by the mosaic dataset are not copied.

  • This tool does not support copying a network dataset back into the same geodatabase.

  • This tool does not support the MRF image format. To copy an .mrf file, use the Copy Raster tool.

  • When the input has associated data, the Associated Data parameter value is displayed where the associated output data's name and config keyword can be controlled.

Parameters

LabelExplanationData Type

Input Data

The data to be copied.

Data Element

Output Data

The location and name of the output data.

Data Element

Data type

(Optional)

The type of the data on disk to be copied.

This parameter is only necessary in the event of a name conflictbetween two different data types. For example, a geodatabase cancontaina relationship class with an identical name to a feature class. If that is the case, specify the relevant keyword.

  • FeatureClass—In the event of duplicate names, the feature class will be used.
  • FeatureDataset—In the event of duplicate names, the feature dataset will be used.
  • MosaicDataset—In the event of duplicate names, the mosaic dataset will be used.
  • ParcelFabric—In the event of duplicate names, the parcel fabric will be used.
  • RelationshipClass—In the event of duplicate names, the relationship class will be used.
  • Topology—In the event of duplicate names, the topology will be used.
String

Associated Data

(Optional)

When the input has associated data, this parameter can be used to control the associated output data's name and config keyword.

  • From Name—The data associated with the input data, which will also be copied.
  • Data Type—The type of the data on disk to be copied. The only time you need to provide a value is when a geodatabase contains a feature dataset and a feature class with the same name. In this case, select the correct data type, FeatureDataset or FeatureClass, of the item you want to copy.
  • To Name—The name of the copied data in the Output Data parameter value.
  • Config Keyword—The geodatabase storage parameters (configuration).

The From Name and To Name column names will be identical if the To Name value is not already used in Output Data. If a name already exists in the Output Data value, a unique To Name value will be created by appending an underscore plus a number (for example, rivers_1).

Value Table
arcpy.management.Copy(in_data, out_data, {data_type}, {associated_data})
NameExplanationData Type

in_data

The data to be copied.

Data Element

out_data

The location and name of the output data. The file name extension of the output data must match the extension of the input data. For example, if you are copying a file geodatabase, the output data element must have .gdb as a suffix.

Data Element

data_type

(Optional)

The type of the data on disk to be copied.

This parameter is only necessary in the event of a name conflictbetween two different data types. For example, a geodatabase cancontaina relationship class with an identical name to a feature class. If that is the case, specify the relevant keyword.

  • FeatureClass—In the event of duplicate names, the feature class will be used.
  • FeatureDataset—In the event of duplicate names, the feature dataset will be used.
  • MosaicDataset—In the event of duplicate names, the mosaic dataset will be used.
  • ParcelFabric—In the event of duplicate names, the parcel fabric will be used.
  • RelationshipClass—In the event of duplicate names, the relationship class will be used.
  • Topology—In the event of duplicate names, the topology will be used.
String

associated_data

[[from_name, data_type, to_name, config_keyword],...]

(Optional)

When the input has associated data, this parameter can be used to control the associated output data's name and config keyword.

  • from_name—The data associated with the input data, which will also be copied.
  • data_type—The type of the data on disk to be copied. The only time you need to provide a value is when a geodatabase contains a feature dataset and a feature class with the same name. In this case, use the correct data type, FeatureDataset or FeatureClass, of the item you want to copy.
  • to_name—The name of the copied data in the out_data parameter value.
  • config_keyword—The geodatabase storage parameters (configuration).

The from_name and to_name column names will be identical if the to_name value is not already used in out_data. If a name already exists in the out_data value, a unique to_name value will be created by appending an underscore plus a number (for example, rivers_1).

Value Table

Code sample

Copy example 1 (Python window)

The following Python window script demonstrates how to use the Copy function in immediate mode.

import arcpyarcpy.env.workspace = "C:/data"arcpy.management.Copy("majorrds.shp", "C:/output/majorrdsCopy.shp")
Copy example 2 (stand-alone script)

The following Python script demonstrates how to use the Copy function in a stand-alone script:

# Name: Copy_Example2.py# Description: Copy major roads dataset to preserve the original data# Import system modulesimport arcpy# Set workspacearcpy.env.workspace = "C:/data"# Set local variablesin_data = "majorrds.shp"out_data = "C:/output/majorrdsCopy.shp"# Run Copyarcpy.management.Copy(in_data, out_data)
Copy example 3 (stand-alone script)

The following Python script demonstrates how to use the associated_data parameter on the Copy function:

# Name: Copy_Example3.py# Description: Copy a feature dataset and specify associated_data# Import system modulesimport arcpy# The input is a feature dataset containing 3 feature classes: lakes, cities, riversin_data = "C:/data/proj.gdb/mexico" out_data = "C:/data/proj.sde/mexico"associated_data = ";".join(["lakes FeatureClass mexico_lakes #", "cities FeatureClass mexico_cities #", "rivers FeatureClass mexico_rivers #"])# Rename each feature class during the copy operation using the associated_data parameterarcpy.management.Copy(in_data, out_data, associated_data=associated_data)

Environments

Current Workspace, Output CONFIG Keyword, Scratch Workspace, Maintain Attachments

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics

  • An overview of the General toolset
  • Find a geoprocessing tool

Feedback on this topic?

Copy (Data Management)—ArcGIS Pro | Documentation (2024)
Top Articles
Yes, White Guys Can Go to Black Barbershops
Craig Ehlo Net Worth
Bleak Faith: Forsaken – im Test (PS5)
Bashas Elearning
Craglist Oc
Toyota gebraucht kaufen in tacoma_ - AutoScout24
Mawal Gameroom Download
Words From Cactusi
Flat Twist Near Me
United Dual Complete Providers
Tiraj Bòlèt Florida Soir
Why Is Stemtox So Expensive
Richmond Va Craigslist Com
Drago Funeral Home & Cremation Services Obituaries
Jenn Pellegrino Photos
25Cc To Tbsp
Wal-Mart 140 Supercenter Products
Hollywood Bowl Section H
Rugged Gentleman Barber Shop Martinsburg Wv
What Is Vioc On Credit Card Statement
Teacup Yorkie For Sale Up To $400 In South Carolina
Webcentral Cuny
Kashchey Vodka
Tyrone Unblocked Games Bitlife
Del Amo Fashion Center Map
Robotization Deviantart
Ordensfrau: Der Tod ist die Geburt in ein Leben bei Gott
Kuttymovies. Com
Evil Dead Rise Showtimes Near Regal Sawgrass & Imax
WOODSTOCK CELEBRATES 50 YEARS WITH COMPREHENSIVE 38-CD DELUXE BOXED SET | Rhino
417-990-0201
Publix Coral Way And 147
Helloid Worthington Login
Clearvue Eye Care Nyc
Emiri's Adventures
Average weekly earnings in Great Britain
Pnc Bank Routing Number Cincinnati
Mp4Mania.net1
Bitchinbubba Face
Boone County Sheriff 700 Report
Fapello.clm
Tryst Houston Tx
Gold Dipping Vat Terraria
Electronic Music Duo Daft Punk Announces Split After Nearly 3 Decades
Suffix With Pent Crossword Clue
Carroll White Remc Outage Map
Alba Baptista Bikini, Ethnicity, Marriage, Wedding, Father, Shower, Nazi
Jackerman Mothers Warmth Part 3
Canonnier Beachcomber Golf Resort & Spa (Pointe aux Canonniers): Alle Infos zum Hotel
Unit 4 + 2 - Concrete and Clay: The Complete Recordings 1964-1969 - Album Review
Land of Samurai: One Piece’s Wano Kuni Arc Explained
Swissport Timecard
Latest Posts
Article information

Author: Kieth Sipes

Last Updated:

Views: 6595

Rating: 4.7 / 5 (67 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Kieth Sipes

Birthday: 2001-04-14

Address: Suite 492 62479 Champlin Loop, South Catrice, MS 57271

Phone: +9663362133320

Job: District Sales Analyst

Hobby: Digital arts, Dance, Ghost hunting, Worldbuilding, Kayaking, Table tennis, 3D printing

Introduction: My name is Kieth Sipes, I am a zany, rich, courageous, powerful, faithful, jolly, excited person who loves writing and wants to share my knowledge and understanding with you.