Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23247

How do I list all the file from one subdirectory from a list of subdirectories

$
0
0

I am trying to list files by their directory and do something with files and go to next directory

this is the folder tree

root   div1      subdiv1         up1           d1s1u1_1.file           d1s1u1_2.file         up2           d1s1u2_1.file           d1s1u2_2.file      subdiv2         up1           d1s2u1_1.file           d1s2u1_2.file         up2           d1s2u2_1.file           d1s2u2_2.file   div2      subdiv1         up1           d2s1u1_1.file           d2s1u1_2.file         up2           d2s1u2_1.file           d2s1u2_2.file      subdiv2         up1           d2s2u1_1.file           d2s2u1_2.file         up2           d2s2u2_1.file           d2s2u2_2.file   div3      subdiv1         up1           d3s1u1_1.file           d3s1u1_2.file         up2           d3s1u2_1.file           d3s1u2_2.file      subdiv2         up1           d3s2u1_1.file           d3s2u1_2.file         up2           d3s2u2_1.file           d3s2u2_2.file

how do I list files under up1 of div1 do something to the listed files and go to up2 and do the same thing for rest of the divs


Viewing all articles
Browse latest Browse all 23247

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>