GroupDocs.Merger allows developers to combine multiple ZIP documents in the preferred order and save them as a single file. You will not spend your time doing these operations manually on desktop software.
With GroupDocs.Merger it is possible to combine archive documents of any archive extensions such as ZIP or TAR.
The following example demonstrates how to merge archive files with several lines of C# code:
Create an instance of Merger class and pass source archive file path as a constructor parameter. You may specify absolute or relative file path as per your requirements.
Add another archive file to merge with Join method. Repeat this step for other archive documents you want to merge.
Call Merger class Save method and specify the filename for the merged archive file as parameter.
// Load the source archive fileusing(Mergermerger=newMerger(@"c:\sample1.zip")){// Add another archive file to mergemerger.Join(@"c:\sample2.zip");// Merge archive files and save resultmerger.Save(@"c:\merged.zip");}
Merge different archive file formats
This section describes how to merge different archive file formats using GroupDocs.Merger API. Please look at the articles listed below: