摘要:
import os import shutil def del_file(filepath): """ 删除某一目录下的所有文件或文件夹 :param filepath: 路径 :return: """ del_list = os.listdir(filepath) for f in del_lis 阅读全文
posted @ 2020-06-12 21:48
一杯明月
阅读(4047)
评论(0)
推荐(0)
摘要:
创建文件夹 import os def mkdir(path): folder = os.path.exists(path) if not folder: #判断是否存在文件夹如果不存在则创建为文件夹 os.makedirs(path) #makedirs 创建文件时如果路径不存在会创建这个路径 p 阅读全文
posted @ 2020-06-12 21:13
一杯明月
阅读(15112)
评论(0)
推荐(1)
浙公网安备 33010602011771号