02 2020 档案

摘要:import os import zipfile def zipDir(dirpath): """ 压缩指定文件夹 :param dirpath: 目标文件夹路径 """ outFullName = dirpath + '.zip' zip = zipfile.ZipFile(outFullName 阅读全文
posted @ 2020-02-29 14:34 wztshine 阅读(376) 评论(0) 推荐(0) 编辑
摘要:import os """判断两个文件夹里是否有相同文件名的文件""" def fileList(path): filelist = {} n = 1 for root,folders,files in os.walk(path): for file in files: print('\rHas s 阅读全文
posted @ 2020-02-26 09:29 wztshine 阅读(1794) 评论(0) 推荐(0) 编辑
摘要:import hashlib import os import send2trash import time ''' 根据MD5,查找一个目录下的相同文件,并且可以选择是否删除(只是删除到回收站) ''' def getMD5(path): f=open(path,'rb') d5 = hashli 阅读全文
posted @ 2020-02-25 19:11 wztshine 阅读(1218) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示