Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
47 views

For some reason the zip file is always empty. zipInMemory.Length = 0 but below shows the zip with 2 entries... zipArchive `Response.Clear() Response.BufferOutput = False Dim zipFileName As String = [...
Steve Grody's user avatar
1 vote
1 answer
119 views

I have a program that works with projects consisting of multiple files. Each project is saved in a folder of the same name, with project file of the same name, plus one or more support files. C:\...\...
NⵙⵙB's user avatar
  • 129
1 vote
1 answer
66 views

I have a folder with many sub directories I want to exclude some extensions, but they are only excluded from the first directory level, how to exclude from all directories. Example of Directory (...
Nickotine's user avatar
  • 189
0 votes
1 answer
123 views

I am trying to get the file version from binaries and the date modified from the SQL file and encountered issues This is my ZIP $vipFile = Get-ChildItem -ErrorAction Stop -Path "C:\Patch_2029274....
Bandit's user avatar
  • 523
1 vote
1 answer
146 views

I am working on a project where I need to handle version downgrades of System.IO.Compression.Native.dll in an MSI installer. This issue was discussed on GitHub, where it was suggested to use the ...
Kristoffer Tungland's user avatar
2 votes
1 answer
870 views

I need to compress a string to Zlib in PowerShell. Is there a way we can compress using the ZLibStream class in PowerShell? https://learn.microsoft.com/en-us/dotnet/api/system.io.compression....
John Smith's user avatar
3 votes
2 answers
161 views

The official C# documentation states, that ZipFile.CreateFromDirectory() creates a zipfile on the disk, as an intermediate step. However I need my system to run on devices where disk space is critical....
user avatar
1 vote
0 answers
182 views

I am writing a function that grabs & decompresses a value from Redis using a key. So far I am able to successfully grab the value, however when I try to decompress the value using GZipStream, it ...
redbullPoweredDev's user avatar
0 votes
0 answers
201 views

I am kinda new to C# and visual studio. I try to unzip a zip and overwrite files if they already exist with the following function: using System.IO; using System.IO.Compression; ZipFile....
Minimalistiker's user avatar
0 votes
1 answer
679 views

I have a .zip file containing three jpg images. I want to display all three of them in one FlowDocumentReader in WPF. This is my code: FlowDocument flowDoc = new FlowDocument(); ZipArchive zipFile = ...
Stefan's user avatar
  • 75
1 vote
0 answers
381 views

I'm trying to zip specific files however on some files powershell breaks due to the charachter limit of 256, I know I can can alter this y changing registry keys. But I kind of want to ignore this ...
Kirito's user avatar
  • 49
1 vote
1 answer
849 views

is there any faster way to filter a zip file? My code reads the file line by line, so the data loads very slowly. Can I filter more than one line at a time? $ZipPath = 'C:\Test\TestZip.zip' Add-Type -...
LordDevPath's user avatar
3 votes
1 answer
766 views

In Powershell, I'm trying to create a zip file from a large text string, attach it to an email message, and send it along. The trick is that I need to do it without using local storage or disk ...
Tony's user avatar
  • 2,774
2 votes
2 answers
2k views

I've encrypted .zip archive with some files. Later archive contents must be checked by someone who doesn't know encryption password. Is there any way to do this in powershell? Ubuntu has zip -sf ...
malene.dev's user avatar
5 votes
2 answers
9k views

We have an Asp.Net MVC project that we have recently upgraded from .Net 4.6.1 to .Net 4.8. It has some dependencies on other projects in our solution that have also been upgraded. The MVC project ...
Simon Williams's user avatar
1 vote
1 answer
204 views

PSVersion 5.1.18362.2212 I would like to know if it is possible to read in a set of text files, modify their content and their filenames and store the results directly into a ZIP file? The following ...
Eric's user avatar
  • 1,317
10 votes
2 answers
15k views

I am working on a project to compress files that range anywhere from a couple mb to several gb's big and I am trying to use powershell to compress them into a .zip. The main problem I am having is ...
td1126's user avatar
  • 101
10 votes
3 answers
10k views

I'm using the next code to download some zip archive: $client = new-object System.Net.WebClient $client.DownloadFile("https://chromedriver.storage.googleapis.com/$LatestChromeRelease/...
Sergio Ramos's user avatar
1 vote
2 answers
999 views

I'm trying to create a tool that takes images on my server, and downloads them to the user in a zip file. These images are Sitecore media items, that I'm getting the Stream from, and trying to copy ...
Erica Stockwell-Alpert's user avatar
0 votes
1 answer
659 views

I am trying to use .NET classes instead of native compress-archive to zip multiple directories (each containing sub-directories and files), as compress-archive is giving me occasional OutOfMemory ...
dig_123's user avatar
  • 2,398
2 votes
1 answer
1k views

Final Update: Turns out I didn't need Binary writer. I could just copy memory streams from one archive to another. I'm re-writing a PowerShell script which works with archives. I'm using two ...
sudosu's user avatar
  • 23
2 votes
1 answer
2k views

I have a script that can open a ZIP file and modify the content of a xml file and working good I want to run for a loop at all the ZIP files and change them but I get an error $files = Get-ChildItem -...
Bandit's user avatar
  • 523
1 vote
0 answers
765 views

I'm writing a code to compress/zip folders and files in C#, and for this purpose, I am using ZipFile method from System.IO.Compression. Now if I create a zip file using Winrar (fastest mode), it takes ...
Saad Khan's user avatar
0 votes
2 answers
2k views

I am copying files from one zip file to another in certain circumstances. I am wondering if there is a better way to do it than what I came up with: using FileStream sourceFileStream = new FileStream(...
a.rlx's user avatar
  • 54
0 votes
1 answer
910 views

The issue happens when I upload a file to one blob (Blob1) which in turn runs a background compression service. The background service streams the file from Blob1, compresses it, and stores it as a ...
ImposterX1's user avatar
1 vote
0 answers
434 views

I am trying to download multiple files in zip format. I've followed every single things that I've found online, but still failed. Here is my code. public FileResult DownloadMultipleFiles(IEnumerable&...
sicKo's user avatar
  • 1,256
0 votes
0 answers
371 views

I'm trying to set the ZipArchiveEntry.LastWriteTime so that when extracted, it is the 'exact' same time, but I'm getting random time differences. Here is a specific example. var fileName = @"C:\...
Terry's user avatar
  • 2,028
2 votes
1 answer
2k views

I have a class that takes data from several sources and writes them to a ZIP file. I've benchmarked the class to check if using CompressionLevel.Optimal would be much slower than CompressionLevel....
Michael's user avatar
  • 2,143
0 votes
1 answer
724 views

I recently updated Jetbrains Team City to version 2020.2.2. I use it to build my project whenever I check code into my source repository. I use the TeamCity API to DownloadAll in order to retrieve ...
Curtis's user avatar
  • 5,890
-1 votes
2 answers
565 views

I am writing a code to compress a ZIP file in C# using the built in .NET library: using System.IO.Compression; using System.IO; But, however, when the compression finishes, the code outputs an invalid ...
user1769881's user avatar
3 votes
4 answers
2k views

I am creating a zip file using ZipArchive + FileStream. When new item is added into zip file, I would like to flush/write newly added item to underneath zip stream. The code below is not flushing the ...
LP13's user avatar
  • 34.8k
0 votes
1 answer
1k views

I'm trying to zip varying amounts of files so that one zip folder can be served to the user instead of them having to click multiple anchor tags. I am using the System.IO.Compression namespace in asp....
Chase T's user avatar
  • 47
2 votes
1 answer
2k views

I would like to know if it is possible to check the size of the zip file that is being created dynamically, because I am reading a directory and generate a 19 MB zip and I would like two zips instead ...
Airton Pereira's user avatar
1 vote
0 answers
155 views

I am using the ZipFile method in the System.IO.Compression library. Here is the simple function I have written : public void zipUnzip() { string zipPath = @"C:\zipped_folder.zip"; ...
s_om's user avatar
  • 681
2 votes
1 answer
1k views

In order to update a progress bar with the number of files to extract. My program is going over a list of Zip files and collects the number of files in them. The combined number is approximately 22000 ...
Juv's user avatar
  • 952
0 votes
0 answers
1k views

I need to get the % while compressing a zip file using C# with System.IO.Compression. I have this code: if (isDirectory) { Invoke(new RefreshConsoleEncryptionDel(...
KAoTI's user avatar
  • 47
0 votes
1 answer
96 views

The Library loads and I am able to view the ziparchiveentries in the debugger but I can not access the methods or properties of the ziparchiveentry object array by reflection: Assembly CompressionLib ...
Hamad Salman's user avatar
1 vote
1 answer
535 views

I'm trying to verify the contents of a ZIP archive in PowerShell by counting the number of zipped entries like this answer. However, the results are inconsistent between 7Zip GUI, gci, Entries.Count ...
Duodenalsalmons's user avatar
1 vote
0 answers
2k views

The files I want to zip are in different folders The folder structure is as follows: FileId/FileType/File.extension FileId/FileType/File.extension I'm trying to create a zip with the following ...
Binoy Cherian's user avatar
2 votes
1 answer
728 views

I'm using System.IO.Compression in order to compress a file into a .zip, below the source code: using (FileStream zipToOpen = new FileStream(zipName, FileMode.CreateNew)){ using (ZipArchive archive ...
Tytiro's user avatar
  • 23
0 votes
0 answers
2k views

I am extracting a zip file using system.io.compression in .net 4.5 var path = @"<zipfilePath>"; using (ZipArchive zarc = ZipFile.Open(path, ZipArchiveMode.Read,Encoding.UTF8)) { ...
Debashish Saha's user avatar
4 votes
1 answer
4k views

I have a code that get all files on a directory, compresses each one and creates a .zip file. I'm using the .NET Framework ZipArchive class on the System.IO.Compression namespace and the extension ...
David Ortega's user avatar
2 votes
1 answer
2k views

I am struggling to configure a script to unzip all .zip archives in a directory and place the extracted files into a different directory. I am wanting to schedule this script to run on a schedule to ...
meckley's user avatar
  • 21
0 votes
2 answers
2k views

As per this post I'm zipping SQL backup files with the code below: using (ZipArchive zip = ZipFile.Open("test.bak", ZipArchiveMode.Create)) { zip.CreateEntryFromFile(@"c:\something.txt", "data/...
Cameron Castillo's user avatar
1 vote
1 answer
948 views

I have the following lines of code that work for creating a zip using ZipFile.CreateFromDirectory(selectedFile, zipPath) if (selectedFolder == string.Empty) { Console....
casperf1's user avatar
  • 101
2 votes
1 answer
313 views

I wrote the following simple program to test: using System; using System.IO; using System.IO.Compression; namespace HelloZip { class Program { static void Main(string[] args) ...
Shay Guy's user avatar
  • 1,050
1 vote
1 answer
2k views

I'm using ExcelDataReader 3.4 and it work fine on my developer PC, but when used on production PC, I've got this error System.IO.FileLoadException: Could not load file or assembly 'System.IO....
Raphael's user avatar
  • 883
2 votes
2 answers
223 views

Here is part of the code i am working on (modified for clarity): public Stream getMyArchiveStream(string archivepath) { using(var archive = ZipFile.OpenRead(_filepath)) { var entry = ...
DerMaggi's user avatar
3 votes
1 answer
3k views

My problem can be described with following statements: I would like my program to be able to compress and decompress selected files I have very large files (20 GB+). It is safe to assume that the size ...
Radoslaw Jurewicz's user avatar
0 votes
2 answers
3k views

My code is below: [System.Web.Mvc.HttpPost] public ActionResult DownloaZipFile([FromBody] int id) { var result = _service.GetDocuments(id); var downloadFileName = $"Report{...
Krutal Modi's user avatar