I have a directory composed of 3 folders :
----- 001
----- 002
----- 003
I'd like to create 3 archives named 001.zip, 002.zip and 003.zip. Each archive has to be composed of the content of the folder.
I use the zipfile library and I managed to make an archive of one folder :
import os, zipfile
zf = zipfile.ZipFile('C:/zipfile4.zip', mode='w')
for dirpath,dirs,files in os.walk("C:/Test/002"):
for f in files:
fn = os.path.join(dirpath, f)
zf.write(fn)
But I don't know how to make to create many archives in a row, using that zipfile library.