recursive folder scan

Solutions on MaxInterview for recursive folder scan by the best coders in the world

showing results for - "recursive folder scan"
Lucia
26 Oct 2017
1import os
2import sys
3
4for root, subdirs, files in os.walk(path):
5
6    for file in os.listdir(root):
7
8        filePath = os.path.join(root, file)
9
10        if os.path.isdir(filePath):
11            pass
12
13        else:
14            f = open (filePath, 'r')
15            # Do Stuff
16