I try to unzip 150 zip files. All the zip files as different names, and they all spread in one big folder that divided to a lot of sub folders and sub sub folders.i want to extract each archive to separate folder with the same name as the original zip file name and also in the same place as the original zip file . my code is:
import zipfile
import os,os.path,sys
pattern = '*.zip'
folder = r"C:\Project\layers"
files_process = []
for root,dirs,files in os.walk(r"C:\Project\layers"):
for filenames in files:
if filenames == pattern:
files_process.append(os.path.join(root, filenames))
zip.extract()
After i run the code nothing happened. Thanks in advance for any help on this.
zipfile
module: docs.python.org/2/library/zipfile.html – Jacalynjacamar