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)

Likes(0)

Comment list count 0 Comments

No Comments