I am trying to create a Python script that batch projects every shapefile in a geodatabase to a temporary geodatabase that I created. I realized that this script that I created does not iterate through the multiple feature datasets of the geodatabase.
The code that I created only projects the file "breaklines". I need to also iterate through "Contours" and "Hydro". I know that I need to create a double loop but I am not sure how to do it. Here is the code that I started below
import glob, os, shutil, time, arcpy path = r"C:\...\SARA_New_Contours.gdb" temp = r"C:\...\Temp.gdb" string1 = "\\metersproj-" arcpy.env.workspace = path out_coor_system = arcpy.SpatialReference("C:\...\NAD 1983 (2011) StatePlane Texas S Central FIPS 4204 (Meters).prj") for fc in arcpy.ListFeatureClasses(): prefix = string1 + fc out_dataset = temp + "\\" + prefix arcpy.Project_management (fc, out_dataset, out_coor_system)
A side question: How would I just loop through one dataset, for example: just the feature dataset called "Contours"?