Splitting Large (~1gb+) files

Feb 2, 2010 at 8:48 PM

I'm running into an issue when taking a large file and splitting it.

When the file gets close to 1gb or over (I've tested on a 980mb file and a 2.5gb file), splitting the zip file doesn't seem to work. I get an exception as follows:

{"Could not find file 'C:\\ziptest\\zipped\\SQL Server Developer 2005.z01'.":"C:\\ziptest\\zipped\\SQL Server Developer 2005.z01"}


If I watch it when its going, the file is created in the directory (along with a tmp file). It churns away for a bit and then produces that error message. The files also disappear from the directory.

If I remove the MaxOutputSegmentSize line, it works just fine on all the large files. Splitting works fine for me on small files.

Changing the MaxOutputSegmentSize value seems to make no difference. So it seems to me like it is a combo of large files and splitting.



zip.Comment = "This zip was created at " + System.DateTime.Now.ToString("G");

zip.MaxOutputSegmentSize = 500000 * 1024;

string strOutputFileName = fiFileToProcess.Name.Substring(0, fiFileToProcess.Name.Length - 3);
zip.Save(strZipDir + "\\" + strOutputFileName + "zip");

Any ideas?

Feb 2, 2010 at 9:14 PM

Your code looks fine.

That's an odd error message.  Can you give me the entire stack trace?

Feb 2, 2010 at 9:14 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.