I am not able to create split zip files. i am using Xceed zip version 5.5. so far i am able to create zip file but not able to create split zip files. i appreciate if you could help me to resolve this issue.
Code :
string desti = @”F:\XceelConsole\”;
string sourceFolder = @”F:\XceelConsole\TestFolder\”;
AbstractFolder dest = new DiskFolder(desti);
if (dest.Exists)
{
foreach (AbstractFile file in dest.GetFiles(false, “split.*”))
{
file.Delete();
}
}
AbstractFile zipFile = dest.GetFile(“split.zip”);
zipFile.Create();
ZipArchive archive = new ZipArchive(zipFile);
AbstractFolder source = new DiskFolder(sourceFolder);
archive.TempFolder = new DiskFolder(@”F:\XceelConsole”);
archive.SplitSize = splitSizeMB * 1024 * 1024;
archive.SplitNameFormat = SplitNameFormat.None;
source.CopyFilesTo(archive, true, true);
Error Message: Cannot perform the requested operation on an item that does not exist.
Type: Xceed.FileSystem.DiskFile
FullName: F:\XceelConsole\c3351864-f965-4872-a9a9-d5f5343a77e6.tmp
Error StackTrace: at Xceed.FileSystem.DiskFile.DoDelete(FileSystemEventsSession session)
at Xceed.FileSystem.FileSystemItem.ListDeleteCore(FileSystemEventsSession session, ItemPair currentItemPair)
at Xceed.FileSystem.FileSystemItem.ListDelete(FileSystemEventsSession session)
at Xceed.FileSystem.FileSystemItem.Delete(FileSystemEvents events, Object userData)
at Xceed.FileSystem.FileSystemItem.Delete()
at Xceed.Utils.Storage.Storage.CleanUpSlaveStorage(Storage slave)
at Xceed.Utils.Storage.Storage.CleanUpSlaveStorages()
at Xceed.Utils.Storage.StorageHandler.Rebuild(FileSystemEventsSession session)
at Xceed.Utils.Storage.StorageHandler.ReleaseReference(FileSystemEventsSession session)
at Xceed.Utils.Storage.StorageHandler.EndUpdate(FileSystemEventsSession session)
at Xceed.Zip.ZipArchive.EndUpdate(FileSystemEvents events, Object userData)
at Xceed.FileSystem.AutoBatchUpdate.System.IDisposable.Dispose()
at Xceed.FileSystem.AbstractFolder.CopyItemsTo(FileSystemEvents events, Object userData, AbstractFolder destinationFolder, Boolean recursive, Boolean includeFolders, Boolean replaceExistingFiles, Object[] filters)
at Xceed.FileSystem.AbstractFolder.CopyFilesTo(AbstractFolder destinationFolder, Boolean recursive, Boolean replaceExistingFiles, Object[] filters)
at TestConsoleApplication.ExceedZip..ctor() in f:\XceelConsole\TestConsoleApplication\ExceedZip.cs:line 40