I want to iteratively add my folders to a zip archive so that all sub-folders are zipped and stored within their parent folder. The following code does not allow me to specify the zip folder path. I would like to have an archive that unzips the contents of the sub-folder.
For example, when 111.zip
is opened, it should give me the files shown below in the abc
sub-directory. And this should happen the same way for all files in the rec
sub-directory, etc.
import shutil
shutil.make_archive("111","zip",'/home/user/rec/abc')