[
  {
    "Id": "1002210",
    "ThreadId": "433372",
    "Html": "How to add files in archieve without paths?<br />\n<br />\nI have a folder c:\\aa\\bb\\cc\\dd\\ee\\ with 10 files<br />\nand make archieve  c:\\aa\\bb\\cc\\dd\\ee\\all.zip<br />\n<br />\nIf  I add files as <br />\n<pre><code>          var filenames = Directory.GetFiles(directoryToZip);\n          foreach (var filename in filenames)\n                            zip.AddFile(filename);\n          zip.Save(zipFileToCreate);\n</code></pre>\n\nin archieve I must step over all this folders<br />\n<pre><code>     aa &lt;Enter&gt;\n     bb &lt;Enter&gt;\n     cc &lt;Enter&gt;\n     dd &lt;Enter&gt;\n     ee &lt;Enter&gt;\n and only then I see my files!</code></pre>\n\n",
    "PostedDate": "2013-02-16T08:48:07.04-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "1002368",
    "ThreadId": "433372",
    "Html": "Hello<br />\n<br />\nThis can be done very easily by passing String.Empty, or &quot;&quot; as the second parameter to the Zip.AddFile method. This will place all the files in the root of the ,zip file (without any directory information) - see the modified code snippet below<br />\n<pre><code> var filenames = Directory.GetFiles(directoryToZip);\n          foreach (var filename in filenames)\n                            zip.AddFile(filename, String.Empty);\n          zip.Save(zipFileToCreate);</code></pre>\n\nBe aware that if you use this method, and have files with the same name in different directories, it will cause an error as it will attempt to place the same file name more than once in the root of the .zip file.<br />\n<br />\nHope this helps<br />\n",
    "PostedDate": "2013-02-17T00:51:56.103-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "1002373",
    "ThreadId": "433372",
    "Html": "Yes! This is what I want. Thanks!<br />\n",
    "PostedDate": "2013-02-17T01:42:30.677-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]