📌  相关文章
📜  python 循环遍历所有文件夹和子文件夹 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:13.252000             🧑  作者: Mango

代码示例1
directory = "c:\\folder\\you\\want\\to\\work_on"

for root, subdirectories, files in os.walk(directory):
    for subdirectory in subdirectories:
        print(os.path.join(root, subdirectory))
    for file in files:
        print(os.path.join(root, file))