I have a folder with ten files in it which I want to loop through. When I print out the name of the file my code works fine:
import os indir = \'/home/des/te
Here's a snippet that will walk the file tree for you:
indir = '/home/des/test' for root, dirs, filenames in os.walk(indir): for f in filenames: print(f) log = open(indir + f, 'r')