The good news is you can achieve this without 'learning' Python coding. The bad news is, you still need to use Python code!
Open a fresh instance of ArcMap, go to the Geoprocessing
menu and select Python
. This will open the Python window. Since there are so many datasets to be added (and therefore drawn), I recommend pausing the data view before proceeding.
Type the following code into the Python window. Make sure you indent your code in the same way (use four spaces for a single indent, 8 for a double etc). You will need to replace the path C:/DATA
with the path of your base folder, making sure you use forward slashes "/" in the path rather than backslashes (don't ask or you will be learning coding!). You will need to replace the text WATERBODY with some other characters which occur in the filename of every waterbody dataset (do this in CAPTIALS). Once you've altered the path, press Enter
import os
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
workspace = "C:/DATA" #place the path to your data inside the quote marks, remembering to use forward slashes
feature_classes = []
walk = arcpy.da.Walk(workspace, datatype="FeatureClass", type="Polygon")
for dirpath, dirnames, filenames in walk:
for filename in filenames:
feature_classes.append(os.path.join(dirpath, filename))
for dataset in feature_classes:
dataset = dataset.upper()
if "WATERBODY" in dataset:
add_layer = arcpy.mapping.Layer(dataset)
arcpy.mapping.AddLayer(df, add_layer)
Your computer might have to think about thinks for a few seconds/minutes. Once it has finished, you should have all the datasets which are located within that folder and sub-folders, shown in the Table of Contents. Now it's up to you what you want to do with them!