I have two drop down menus I want the first one has name of the folders and when change the other dropdown has names of the sub-folders of this folder

i have the top folders at the first dropdown
how can i have the subfolders at the second when change first?

any help?