I have this code which lists the files in the directory and parses each one of them with my function.
paths = [] for filename in os.listdir(r\"C:\\Program Fi
os.listdir() returns filenames, not paths. Join them with the directory name to make absolute paths:
os.listdir()
path = r"C:\Program Files (x86)\Folder\Folder" for filename in os.listdir(path): with open(os.path.join(path, filename)) as f: