This is a follow up to a previous question I had asked. I wrote a script that will find all Shapefiles in a folder that share a common suffix and will merge these Shapefiles. At present I have to manually change the suffix within the code before I can re-run the script to merge a different set of Shapefiles. I’m wondering if there’s a way to create a text file with a list of the suffixes and generate a loop that will change these suffixes within the code during each iteration of the loop (i.e. change each instance of BL_POINT to BL_POLY and then DA_POLY, etc)?
The code currently looks as follows:
The complete list of suffixes is as follows:
BL_POINT, BL_POLY, DA_POLY, DL_LINE, LC_LINE, LC_POINT, LC_POLY, LF_DEM, LF_LINE, LF_SPOT, WA_JUNC, WA_LINE, WA_POINT, WA_POLY, DISTRIB, RR_LINE, RR_POINT, RR_POLY, ST_LINE, ST_POINT, ST_POLY, UT_LINE, UT_POINT, UT_POLY
Thanks in advance for your help!