import os
import zipfile
#Specify the directory to traverse the first-level folder
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)
Post comment 取消回复