8/30/2023 0 Comments 7zip command line split zip files![]() Var compressor = new SevenZipCompressor() Ĭompressor.CompressionMethod = CompressionMethod.Lzma2 Ĭ("v", "100m") Ĭompressor.CompressDirectory("c:\\windows\\fonts\\", "c:\\users\\me\\test.zip") Using the Command Line and the 7z.exe file, the following works perfectly: 7z.exe a "c:\users\me\test.zip" "c:\Windows\Fonts" -v100mīut the following code gives the error "Value does not fall within the expected range." SevenZipCompressor.SetLibraryPath("c:\\program files\\7-zip\\7z.dll") ZipFile.MaxOutputSegmentSize = 100 * 1000000 įinally, I've tried the 7z.dll and SharpCompress. ZipFile.AddDirectory("c:\\windows\\fonts", directoryPathInArchive: string.Empty) Next I tried Ionic.zip, which looked super easy, but every set of files I create is corrupted in some way (for example, the following code that uses the fonts directory as a test directory creates a set of files that I can't then open or unzip as an archive with either winzip or winrar): using (var zipFile = new (Encoding.UTF8)) I've found quite a few threads on this, but nothing has quite worked out for me.įirst I tried System.IO.Compression, but found that it doesn't support splitting the zip files (please correct me if I'm wrong!). I want to create a zip file from a folder that it around 1.5GB, and have that zip file be split into chunks of 100MB.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |