sorry for the simple question, but i dont know how to solve my easy problem. I would like to create a folder tree. I am selecting the main folder and create the first level of subfolder. But I dont know how to create the second level of folders nested in some of the first level.
Example: MAIN FOLDER (SELECTED) contain the folders A,B and C the folder A should contain the folder A1 the folder C should contain the folder C1
import pathlib
from tkinter import Tk
from tkinter.filedialog import askdirectory
folder = ["A", "B", "C"]
root = Tk()
root.withdraw()
root.update()
c_path = askdirectory(title='Select Main Folder')
path = c_path + "/"
root.destroy()
for i in folder:
pathlib.Path(path + i).mkdir(parents=True, exist_ok=True)
print("done")
["A", "A/A1", "B", "C", "C/C1" ]