Python3移除(删除)文件及文件夹处理

xiaoxiao2025-06-05  47

效果不错呦!

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

转载请注明原文地址: https://www.6miu.com/read-5031333.html

最新回复(0)