import os
import zipfile
#指定目录遍历一级文件夹
for dirName in os.listdir('./rar/data'):
inputPath = os.path.join('./rar/data', dirName)
outputPath = os.path.join('./rar/zip', dirName + '.zip')
zipDir(inputPath,outputPath)
import os
import zipfile
#指定目录遍历一级文件夹
for dirName in os.listdir('./rar/data'):
inputPath = os.path.join('./rar/data', dirName)
outputPath = os.path.join('./rar/zip', dirName + '.zip')
zipDir(inputPath,outputPath)
发表评论 取消回复