Original User: clarkc5
Okay. I have a rather simple task that I Want to try and automate. Model builder did not seem like the right way to go (I could be wrong and if you think model builder is in fact more appropriate please let me know). So I thought a script would work but need some help. I currently have Several (20) gdb in one folder. In each one of these gdb there is a feature class (Events2HEM). These feature classes all have an attribute field called "HUC_8". This field has different values as you move through all the gdb's. I have now created new gdb's for each value found in the HUC_8 attribute field. I would like to now break up my feature classes into the gdb according to the values found in the HUC_8 field.
FOr example: Older gdb = Fish1.gdb Feature Class is Events2HEM. IN the Huc_8 field lets say we have values of 002, 006, 101, 102. I would like to send anything with value 002 to a new gdb named 002.gdb, and the same for values of 006, 101, 102.
All the new gdb are created already and are located in a new folder. So really I just need a script that will break everything out by the different values found in the HUC_8 field and send them to the corresponding new GDB. The script needs to iterate through 20 gdb found in the old directory.
Here is a photo of the old fodler and gdb, and the new folder and gdb. The new gdb names are values that are found in the HUC_8 field from any if the previous gdb. feature classes. Also there is a picture showing the HUC_8 field with two different values which are found in the Feature class Events2HEM. The feature class is the same through all the different geodatabases, just he HUC_8 values will differ.[ATTACH=CONFIG]19311[/ATTACH]
[ATTACH=CONFIG]19309[/ATTACH]