def extract_zip(filepath):
with zipfile.ZipFile(filepath, "r") as zfile:
for name in zfile.namelist():
if re.search(r'\.zip#x27;, name) is not None:
zfiledata = BytesIO(zfile.read(name))
with zipfile.ZipFile(zfiledata) as zfile2:
for name2 in zfile2.namelist():
zfile2.extract(name2, path="../", pwd=None)
print("Processing Completed. "+str(i)+" file(s) extracted")