I have a Geodatabase-file "mygdb.gdb" with a Feature Dataset therein, "mygdb.gdb\fds". How can I move files into that Feature Dataset with ArcPy? Please see picture: I want to move the shapefile "myshp.shp" and the raster "myraster" into that Feature Dataset with ArcPy.
On that page, I can't find any information about how to handle Feature Datasets with ArcPy. Where is a description how to move an external shapefile or raster into the Feature Dataset with an ArcPy-command?
This explains how to move shapefiles into a geodatabase (in my example: mygdb.gdb). However, I don't understand how to move shapefiles into a Feature Dataset within a geodatabse (in my example: mygdb.gdb\fds).
import arcpy #path to input shapefile to be transferred to fgdb feature dataset in_shp = r'C:\myshapefile.shp' #path to output fc within feature dataset #will likely error if .shp and feature dataset have different projections out_fc = r'C:\mygdb.gdb\myfeaturedataset\myfeatureclass' #run copy features tool arcpy.CopyFeatures_management(in_shp, out_fc)
Thank you David Pike. I understand from your answer that the Feature Dataset within a Geodatabase is for Feature Files of same projection only. It is neither for Feature Files with another projection nor for Raster Files. My problem was, that I was trying to import a Raster File which is not allowed.