Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

remove feature classes from multiple GDBs with slight variance in name - Help!

$
0
0
I am trying to loop through multiple files using arcpy.da.Walk() but need to remove certain featureclasses from the overall process. I am able to do this with

Code:


if "feature dataset" in dirnames:
        filenames.remove('feature type', 'feature type', ...)

The files are 'sl_**_'feature type' : Where ** = a 3 letter code that is different for each GDB.

When I run the script I get an error ValueError: list.remove(x): x not in list.

The question is, how do I handle the variable in the filename so that it can be removed? I have tried multiple different ways but am not getting it past the error.

Viewing all articles
Browse latest Browse all 2485

Latest Images

Trending Articles



Latest Images