Exemple de marche d'os
import os
folder_path = r'C:\Test'
for root,dirs,files in os.walk(folder_path, topdown=True):
print(root)
print(dirs)
print(files)
Nice Newt
import os
folder_path = r'C:\Test'
for root,dirs,files in os.walk(folder_path, topdown=True):
print(root)
print(dirs)
print(files)
# !/usr/bin/python
import os
for root, dirs, files in os.walk(".", topdown=False):
for name in files:
print(os.path.join(root, name))
for name in dirs:
print(os.path.join(root, name))