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
To unzip all the files into a temporary folder (Ubuntu)
import tempfile
import zipfile
tmpdirname = tempfile.mkdtemp()
zf = zipfile.ZipFile('/path/to/zipfile.zip')
for fn in zf.namelist():
temp_file = tmpdirname+"/"+fn
#print(temp_file)
f = open(temp_file, 'w')
f.write(zf.read(fn).decode('utf-8'))
f.close()