I would like to extract multiple .7z files using Python. I've tried this, but it only extracted one file. I already put in a loop.
Below is what I've tried.
import os.path
import glob
from pyunpack import Archive
os.chdir("E:/DATA/raw")
for file in glob.glob("*myfile.7z"):
print(file)
Archive(file).extractall("E:/DATA/output")
The names of the 7z files are:
AHFWHSH_1438923_myfile.7z KFWFAUF_3257485_myfile.7z GDSHUHG_8975498_myfile.7z
My expected output folders are:
output1 output2 output3