I created multipart zip file using DotNetZip library, following is the code used to create:
public Boolean CreateZip(string sourceFolder, string destinationZip)
{
Boolean isZipCreated = false;
try
{
using (ZipFile zipObj=new ZipFile())
{
if (File.Exists(destinationZip))
{
File.Delete(destinationZip);
}
zipObj.AddDirectory(sourceFolder);
zipObj.Encryption = EncryptionAlgorithm.WinZipAes256;
zipObj.CompressionLevel = Ionic.Zlib.CompressionLevel.BestCompression;
zipObj.UseZip64WhenSaving = Zip64Option.Always;
zipObj.MaxOutputSegmentSize = 1024*1024*1024;
zipObj.Save(destinationZip);
isZipCreated = true;
Console.WriteLine("Number of Segments Created "+zipObj.NumberOfSegmentsForMostRecentSave);
}
}
catch (Exception ex)
{
Console.WriteLine("There is an exception inside Create zip method"+ex.Message+ex.StackTrace);
}
return isZipCreated;
}
The size for each segment of zip file is 1 GB. The output files are generated as: file.zip, file.z01, file.z02, etc.
The question is:
How do I extract these files into one single output folder?
Following are the things I have tried:
I tried unzipping first file.zip file using WinRAR, a popup window comes to ask path for another file, but it only asks for one part and exits in error when file.zip and file.z01 are unzipped.
I tried using 7-zip it failed to unzip even the first file, i.e file.zip