AnsweredAssumed Answered

Python script to copy feature classes from feature datasets

Question asked by Geohab on Nov 20, 2015
Latest reply on Nov 20, 2015 by bixb0012

Hi All,

I have a geodatabase which consists of about 100 feature datasets, and each feature dataset contains 2 to 4 feature classes (Please see an example of my geodatabase and its contents).

 

Python Script.png

 

I want to copy a polyline feature class (this feature class's file name in every feature dataset starts with "polyline") from every feature dataset to a new geodatabase as stand alone feature class. I want the new feature classes to be renamed as ("polyline_" + the name of the feature dataset). For example if the original feature dataset and feature class are "Dset4" and "Polyline10_3" respectively, the new feature class will have a file name of "Polyline_Dset4". I also want the new feature class to have less number of fields than the original feature class. Can anyone help me in writing the python script that can do these functions? Thanks in advance.

Outcomes