python - how to delete subfolder recursevely -


i have following problem:

i delete subdirectories , files recursively. have follow:

200 subdirectories. each of them has structure:

             case a0    a1   a2---------a100 

each folder of 100 has 3 sub-folders. 2 of them should kept. other 1 has subdir , multiple files. want keep 1 of files , want keep subfolder

i hope picture show want do. have folder let's case. folder has 100 subdirectories. example 0 folder, want keep b , d. in folder c want keep k , file l.gz. process should run 100 folders a0-a100. thank help. apreciate if 1 on that.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -