效果不错呦!
import shutil,os
if os.path.exists(os.path.join(bizimage_filepath, image_name)):
//移除文件
os.remove(os.path.join(bizimage_filepath, image_name))
//移除空文件夹
shutil.rmtree(bizimage_filepath)
参考文档,写的不错:
https://www.cnblogs.com/linyihai/p/6239067.html
最后
以上就是紧张书包最近收集整理的关于Python3移除(删除)文件及文件夹处理的全部内容,更多相关Python3移除(删除)文件及文件夹处理内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复