[
  {
    "Id": "234437",
    "ThreadId": "68897",
    "Html": "<p>Dear all,</p>\r\n<p>how can I create Zip-Files into one&nbsp;new Zip-File?</p>\r\n<p>For example the following steps:<br>-create a Zip-File named result.zip<br>-create a Zip-File named test1.zip with all files and folders from path C:\\results\\test1\\*.* (with path) and store this into result.zip<br>-create a Zip-File named test2.zip with all files and folders from path D:\\result\\all users\\test2\\*.* and store this also into result.zip</p>\r\n<p>When is it possible, I would use a memorystream to create all zip-files.</p>\r\n<p>I had seen this example (I think so), but I cannot find it again.</p>\r\n<p>Thanks for your support.</p>\r\n<p>regards,<br>Maximilian</p>",
    "PostedDate": "2009-09-14T12:21:09.72-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "234464",
    "ThreadId": "68897",
    "Html": "<div style=\"color:Black;background-color:White\">\r\n<pre>    <span style=\"color:Blue\">Public</span> <span style=\"color:Blue\">Sub</span> Run()\r\n        <span style=\"color:Blue\">Using</span> s1 <span style=\"color:Blue\">As</span> Stream = ZipIntoMemory(<span style=\"color:#A31515\">&quot;c:\\temp\\dir1&quot;</span>)\r\n            <span style=\"color:Blue\">Using</span> s2 <span style=\"color:Blue\">As</span> Stream = ZipIntoMemory(<span style=\"color:#A31515\">&quot;c:\\temp\\dir2&quot;</span>)\r\n                <span style=\"color:Blue\">Using</span> zip1 <span style=\"color:Blue\">as</span> <span style=\"color:Blue\">New</span> ZipFile \r\n                    zip1.AddEntry(<span style=\"color:#A31515\">&quot;test1.zip&quot;</span>, <span style=\"color:#A31515\">&quot;&quot;</span>, s1)\r\n                    zip1.AddEntry(<span style=\"color:#A31515\">&quot;test2.zip&quot;</span>, <span style=\"color:#A31515\">&quot;&quot;</span>, s2)\r\n                    zip1.Save(<span style=\"color:#A31515\">&quot;Tescher.zip&quot;</span>) ' can also save to a Stream here\r\n                <span style=\"color:Blue\">End</span> <span style=\"color:Blue\">Using</span>\r\n            <span style=\"color:Blue\">End</span> <span style=\"color:Blue\">Using</span>\r\n        <span style=\"color:Blue\">End</span> <span style=\"color:Blue\">Using</span>\r\n    <span style=\"color:Blue\">End</span> <span style=\"color:Blue\">Sub</span>\r\n\r\n    <span style=\"color:Blue\">Public</span> <span style=\"color:Blue\">Function</span> ZipIntoMemory(<span style=\"color:Blue\">ByVal</span> path <span style=\"color:Blue\">As</span> <span style=\"color:Blue\">String</span>) <span style=\"color:Blue\">As</span> Stream\r\n        <span style=\"color:Blue\">Dim</span> ms <span style=\"color:Blue\">As</span> <span style=\"color:Blue\">New</span> MemoryStream\r\n        <span style=\"color:Blue\">Using</span> zip1 <span style=\"color:Blue\">as</span> <span style=\"color:Blue\">New</span> ZipFile \r\n            zip1.AddDirectory(path, <span style=\"color:#A31515\">&quot;Result&quot;</span>)\r\n            zip1.Save(ms)\r\n        <span style=\"color:Blue\">End</span> <span style=\"color:Blue\">Using</span>\r\n        <span style=\"color:Green\">' move the stream position to the beginning</span>\r\n        ms.Seek(0,SeekOrigin.Begin)\r\n        <span style=\"color:Blue\">Return</span> ms\r\n    <span style=\"color:Blue\">End</span> <span style=\"color:Blue\">Function</span>\r\n\r\n\r\n</pre>\r\n</div>",
    "PostedDate": "2009-09-14T13:26:21.527-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]