Answers for "Recursive Folder scan"

0

Recursive Folder scan

import os
import sys

for root, subdirs, files in os.walk(path):

    for file in os.listdir(root):

        filePath = os.path.join(root, file)

        if os.path.isdir(filePath):
            pass

        else:
            f = open (filePath, 'r')
            # Do Stuff
Posted by: Guest on April-16-2021

Python Answers by Framework

Browse Popular Code Answers by Language