Merge archives

How to merge archive files in Node.js via Java

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 Node.js via Java 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.
const inputFilePath = `c:/sample1.zip`;
const merger = new groupdocs.merger.Merger(inputFilePath);
const outputPath = `c:/merged.zip`;
merger.join('c:/sample2.zip');
merger.save(outputPath);

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:

Code Examples

Please find more use-cases and complete Node.js via Java sources of our backend and frontend examples and try them for free!

Merge Archives Live Demo

GroupDocs.Merger for Node.js via Java provides online ZIP Merger App and TAR Merger App, which allow you to try it for free and check its quality and accuracy.