Subject: Problem spanning a file
Date: 2014-04-01 15:52:54
From: JORGE MALDONADO
Source: problem-spanning-file
----------------------------------------------------------------------

I am getting an exception when I try to create a file with the spanning option. My code is as follows:

[code lang='c#']

Zip zip = new Zip();
zip.SpanningMode = SpanningMode.Spanning;
zip.VolumeSettings.VolumeSize = VolumeSize.Disk1_44MB;
zip.Create("c:\ZipFiles\zipfile.zip");
zip.EncryptionAlgorithm = EncryptionAlgorithm.PkzipClassic;
 
// Zip file contains several PDF files.
foreach (Object objImagen in objImagenes)
{
    zip.AddFile("c:\PDFFiles\" + objImagen.ToString());
}
zip.Close();

[/code]

The exception I get says that the file cannot be open (I run with debugger) in line zip.Create("c:\ZipFiles\zipfile.zip"); This same code works if I split the file changing zip.SpanningMode = SpanningMode.Spanning; for zip.SpanningMode = SpanningMode.Splitting;

I will very much appreciate your feedback,

Respectfully,
Jorge Maldonado

---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index