Answers for "python get zip file from directory"

1

python zip extract directory

import zipfile

archive = zipfile.ZipFile('archive.zip')

for file in archive.namelist():
    if file.startswith('foo/'):
        archive.extract(file, 'destination_path')
Posted by: Guest on September-20-2020
0

zip a directory in python

shutil.make_archive(output_filename, 'zip', dir_name)
Posted by: Guest on October-08-2020

Code answers related to "python get zip file from directory"

Python Answers by Framework

Browse Popular Code Answers by Language