You are talking of subfolders but you are listing also files. Make the program first function before starting to optimize. Don't however do wrong choices in data structures. Those are difficult to correct later. Luck with the project!
this is the function, im going to make one set of buttons represent the sub folders, and when these are clicked the other set of buttons change to represent the sub folders within that one folder, im storing the names in a dictionary to use the strings for the buttons.
my program searches in folder x, and reads the names of the folders inside, for example x1, x2, x3, i want it to then open x1, and list the folders within x1, and store those, for example x11, x12, x13. id also like it to do the same for x2.
once i know how to make my program do that i can crack on and attempt the rest of the code.