Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Python - Lists all files in folder
from os import listdir
from os.path import isfile, join
dir = "D:\\"
files = [f for f in listdir(dir) if isfile(join(dir, f))]
for f in files:
print join(dir, f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment