I'm trying to extract multiple files from some .zip archives. My code is:
import os
import zipfile
os.chdir('/home/marlon/Shift One/Projeto Philips/Consolidação de Arquivos')
for f in os.listdir("/home/marlon/Shift One/Projeto Philips/Consolidação de Arquivos"):
if f.endswith(".zip"):
z = zipfile.ZipFile(f, 'r')
z.extractall(path = '/home/marlon/Shift One/Projeto Philips/Consolidação de Arquivos/dados')
z.close()
However, it only extracts the files inside the first archive. I'm using Python 3.6. What is wrong?