Answers for "python extract zip file to 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

how to extract zip file using python

ZipFile.extractall(path=None, members=None, pwd=None)
Posted by: Guest on May-19-2020

Code answers related to "python extract zip file to directory"

Python Answers by Framework

Browse Popular Code Answers by Language