title: Save compressed files in file system
body: <p>I want to save multiple files in one Zip file on my disc. This Zip is created but his type is &quot;Compressed (zipped) Folder&quot; and is impossible to open. Error: &quot;Windows cannot open the folder. The Compressed (zipped) Folder 'path' is invalid. Can I make it normal .Zip file somehow?</p>
  <pre><code>int i = 0;
  await using var ms = new MemoryStream();
  {
      using var archive = new ZipArchive(ms, ZipArchiveMode.Create, true);
      {
          foreach (var s in stepwiseData)
          {
              //streamWriter.Write(s);
              var entry = archive.CreateEntry($&quot;Name {i.ToString()}&quot;);
              i++;
              using (BinaryWriter writer = new BinaryWriter(entry.Open()))
              {
                  writer.Write(s.ToArray());
              }
          }
                      
          var folder = @&quot;C:\Temp\test\&quot;;
          var fileName = &quot;TestName.zip&quot;;
          var fullPath = folder + fileName;
  
          var bytes = ms.ToArray();
          File.WriteAllBytes(fullPath, bytes);
      }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/VSqbl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VSqbl.png" alt="enter image description here" /></a></p>