Answers for "extract all of the files from a zip file module in python"

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

Code answers related to "extract all of the files from a zip file module in python"

Python Answers by Framework

Browse Popular Code Answers by Language