Python 遍历 寻找空文件夹

import os
sourceDataPath = r'X:/PM210513163247708'
for home, dir, file in os.walk(sourceDataPath):
    if len(os.listdir(home)) == 0:
        print(home)
print("finished!")
posted @ 2022-03-20 21:37  bH1pJ  阅读(111)  评论(0)    收藏  举报