Hi, so here's what I'm trying to do. I have a parent folder, which I'm calling my workspace. Under that folder are several subfolders, each containing one file geodatabase. Each file geodatabase contains unique feature datasets that I'm trying to merge into one final file geodatabase.
I'm stuck at building the list of the feature datasets. Here's the code in question:
folder = "C:\\Temp\\Extracted"
walk = arcpy.da.Walk(folder, datatype="FeatureDataset")
for dirpath, workspaces, datatypes in walk:
for datatype in datatypes:
print(datatype)
This code yields *everything* in the subdirectory structure down to the feature dataset level. It lists all folder names, all file geodatabases at the .gdb level, and all feature datasets.
What I'm trying to do is get a list back of *only* feature datasets. Can someone tell me where I'm going wrong?
You think they will migrate ArcMap to Python 3.x? You are a more hopeful man than I.
yes. I don't know why they didn't do it for 10.4... but having said that, you just need to install PRO and you can work in both worlds.
/blogs/dan_patterson/2016/04/12/coming-to-python-preparation-and-anticipation
/blogs/dan_patterson/2016/07/17/anaconda-spyder-and-arcgis-pro
and if you have an iPhone, iPad or any iThingy..... /blogs/dan_patterson/2016/06/17/python-35-comes-to-ithings
Here is the steps on adding code blocks to GeoNet:
To add to bixb0012 comments, can you post the output of your script, perhaps in a txt file?
Christian as well /blogs/dan_patterson/2016/08/14/script-formatting beyond the basic stuff as well