文件操作

来源:互联网 发布:淘宝视频缓冲地址 编辑:程序博客网 时间:2024/05/01 22:26

路径和文件名的拼接

import osfullpath = os.path.join(path,filename)

判断文件是否存在,存在则删除

if os.path.exists(fullpath):    os.remove(fullpath)
原创粉丝点击