Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python loop through files in directory recursively

import os
rootdir = './path/to/files/'

for subdir, dirs, files in os.walk(rootdir):
    for file in files:
        print os.path.join(subdir, file)
 
PREVIOUS NEXT
Tagged: #python #loop #files #directory #recursively
ADD COMMENT
Topic
Name
1+9 =