DEV Community 👩‍💻👨‍💻


Posted on

How to unzip multiple zip files in a folder using python?

import zipfile
from pathlib import Path
p = Path('.')
for f in p.glob('*.zip'):
    with zipfile.ZipFile(f, 'r') as archive:
        print(f'Done {f.stem}')
Enter fullscreen mode Exit fullscreen mode

Oldest comments (0)

Become a Moderator
Fill out this survey and help us moderate our community by becoming a tag moderator here at DEV.