How to merge or unzip multiple zip files?

Viewed 148

I have used the ZipFile function that Python has and I wondered if someone could help me either unzip or merge files of the type: filename.zip.001 or filename.zip.002. This is my Code and it did not work because apparently zip.001 is not accepted. Renaming the file did not work.

zip_file2 = "path_to_file"

try:
    with zipfile.ZipFile(zip_file2) as z:
        z.extractall()
        print("Extracted all")
        print(z.namelist())
except:
    print("Invalid file")

Output: "Invalid file"

0 Answers
Related