Liste des fichiers dans Directory Python
import os
print(os.listdir('/path/to/folder/to/list'))
Blushing Badger
import os
print(os.listdir('/path/to/folder/to/list'))
from os import listdir
from os.path import isfile, join
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
import os
def fn(): # 1.Get file names from directory
file_list=os.listdir(r"C:\Users")
print (file_list)
#2.To rename files
fn()
import os
lst=os.listdir(directory)
lstJson = [f for f in os.listdir(str(self.pathJson)) if f.endswith('.json')]
return lstJson
import glob
files=glob.glob(given_path)