Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python loop through all folders and subfolders

directory = "c:folderyouwant	owork_on"

for root, subdirectories, files in os.walk(directory):
    for subdirectory in subdirectories:
        print(os.path.join(root, subdirectory))
    for file in files:
        print(os.path.join(root, file))
 
PREVIOUS NEXT
Tagged: #python #loop #folders #subfolders
ADD COMMENT
Topic
Name
1+9 =