Python -Listendateien im aktuellen Verzeichnis
import os
files = os.listdir('.')
print(files)
for file in files:
# do something
Soggy Boi
import os
files = os.listdir('.')
print(files)
for file in files:
# do something
import os
my_list = os.listdir('My_directory')
import os
files_and_directories = os.listdir("path/to/directory")
import os
print(os.listdir('/path/to/folder/to/list'))
import glob
print(glob.glob("/home/adam/*"))
from os import walk
f = []
for (dirpath, dirnames, filenames) in walk(mypath):
f.extend(filenames)
break