import os files = os.ilistdir() for file in files: print(file)