I have a folder in Windows 7 which contains multiple .txt files. How would one get every file in said directory as a list?
.txt
import fnmatch import os return [file for file in os.listdir('.') if fnmatch.fnmatch(file, '*.txt')]