Feature Class To Shapefile (Conversion)
Summary
Copies the features from one or more feature classes or layers to a folder of shapefiles.
Usage
-
The name of the output shapefile will be the name of the input feature class. For example, if the input is C:\base.gdb\rivers, the output shapefile will be named rivers.shp. To explicitly control the output shapefile name and for some additional conversion options, see the Feature Class to Feature Class tool.
-
If the output shapefile already exists in the Output Folder, a number will be appended to the end to make it unique (for example, rivers_1.shp).
Syntax
Parameter | Explanation | Data Type |
Input_Features [Input_Features,...] |
The list of input feature classes or feature layers that will be converted and added to the output folder. | Feature Layer |
Output_Folder |
The output or destination folder. | Folder |
Code Sample
The following Python window script demonstrates how to use the FeatureClassToShapefile function in immediate mode.
import arcpy from arcpy import env env.workspace = "C:/data/airport.gdb" arcpy.FeatureClassToShapefile_conversion(["county", "parcels", "schools"], "C:/output")
The following Stand-alone script demonstrates how to use the FeatureClassToShapefile function.
# Name: FeatureClassToShapefile_Example2.py # Description: Use FeatureClassToGeodatabase to copy feature classes # to shapefiles # Author: ESRI # Import system modules import arcpy from arcpy import env # Set environment settings env.workspace = "C:/data" # Set local variables inFeatures = ["climate.shp", "majorrds.shp"] outLocation = "C:/output" # Execute FeatureClassToGeodatabase arcpy.FeatureClassToShapefile_conversion(inFeatures, outLocation)