[
  {
    "Id": "646340",
    "ThreadId": "266264",
    "Html": "\r\n<p>Is there a way to add a directory without including hidden files and folders?&nbsp; For example if I try to zip a directory which is in Subversion source control is there a way to add the directory without including any of the .svn sub directories?</p>\r\n",
    "PostedDate": "2011-07-22T14:59:36.59-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "646484",
    "ThreadId": "266264",
    "Html": "<p>You have a couple options -</p>\r\n<ol>\r\n<li>use one of the the AddSelectedFiles() overloads&nbsp;. Specify \"attr != H\" in the criterion string. </li>\r\n<li>select the files yourself (using LINQ for example) and then call AddFiles().&nbsp; </li>\r\n</ol>\r\n<p>For an example of using LINQ, how about this:</p>\r\n<div style=\"color: black; background-color: white;\">\r\n<pre><span style=\"color: blue;\">using</span> (<span style=\"color: blue;\">var</span> zip = <span style=\"color: blue;\">new</span> ZipFile())\r\n{\r\n    <span style=\"color: green;\">// select only non-hidden files </span>\r\n    <span style=\"color: blue;\">var</span> fileNames = (<span style=\"color: blue;\">from</span> fn <span style=\"color: blue;\">in</span> Directory.GetFiles(<span style=\"color: #a31515;\">directoryName</span>, <span style=\"color: #a31515;\">\"*.*\"</span>, SearchOption.AllDirectories)\r\n                <span style=\"color: blue;\">where</span> ((File.GetAttributes(fn) &amp; FileAttributes.Hidden) == 0)\r\n                <span style=\"color: blue;\">select</span> fn).ToList();\r\n    zip.AddFiles(fileNames);\r\n    zip.Save(archiveName);\r\n}\r\n</pre>\r\n</div>",
    "PostedDate": "2011-07-23T07:10:51.373-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "647241",
    "ThreadId": "266264",
    "Html": "<p>These are some great alternatives; I'll give them a try.&nbsp; Thanks.</p>",
    "PostedDate": "2011-07-25T09:54:01.6-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]