📜  python os.walk recursive - Python 代码示例

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

代码示例1
for root, dirs, files in os.walk(rootFolderPath):
    for filename in files:
        doSomethingWithFile(os.path.join(root, filename))
    for dirname in dirs:
        doSomewthingWithDir(os.path.join(root, dirname))