python–删除指定文件夹
删除指定后缀文件 import os def del_files(path, delend): for root, dirs, files in os.walk(path): for name in files: if name.endswith(delend): os.remove(os.path.join(root, name)) print("delete file :", os.path.join(root, name)) if __name__ == '__main__':