删除空文件夹 2015/10/27 15180 import os for root, dirs, files in os.walk(top, topdown=False): for name in dirs: try: os.rmdir(os.path.join(root, name)) except: pass