I would like the user to select 2 directories, each directory having their own defined algorithms. For example: First_Directory will add a column to all shapefiles in the chosen directory; Second_Directory will delete a column to all shapefiles in the chosen directory.
When selecting one directory and leaving the other blank, i.e. only First_Directory and leaving Second_Directory blank, the algorithms defined for First_Directory work fine and vice versa.
However when selecting for both, it seems that only First_Directory is processed. What I would like is, ofcourse, for both directories to be processed sequentially.
The code below is merely trying to show the logic, it's the IF statement that I am concerned about (whether or not it's even required in the first place!)
##Test=name ##First_Directory=folder ##Second_Directory=folder path_1 = First_Directory path_2 = Second_Directory path = path_1 or path_2 os.chdir(path) def First(path_1): #Do some processing def Second(path_2): #Do some other processing if path_1: score_1(path_1) elif path_2: score_2(path_2) elif path_1 and path_2: score_1(path_1) score_2(path_2) else: pass