GroupDocs.Merger for Python via .NET allows you to combine multiple archive files into a single archive programmatically. The library supports common archive formats such as ZIP and TAR — no external compression tools required.
Steps to merge ZIP archives
Create an instance of the Merger class and pass the path to the first (base) ZIP file.
Call merger.join() with the path to each additional ZIP file to append.
Call merger.save() with the desired output path to write the merged archive.
fromgroupdocs.mergerimportMergerdefmerge_archive_documents():# Load the first archive as the merge basewithMerger("./input.zip")asmerger:# Append the second archivemerger.join("./input2.zip")# Save the combined archivemerger.save("./output.zip")if__name__=="__main__":merge_archive_documents()
input.zip is a sample file used in this example. Click here to download it.
input2.zip is a sample file used in this example. Click here to download it.
GroupDocs.Merger for Python via .NET provides online ZIP Merger App and TAR Merger App, which allow you to try them for free and check their quality and accuracy.