[
  {
    "Id": "683867",
    "ThreadId": "275798",
    "Html": "\r\n<p>I am trying to implement a code that filter some files from the driver C:, but I am getting no files returned in my zip.</p>\r\n<p>Here is my code:</p>\r\n<p></p>\r\n<div style=\"color:black; background-color:white\">\r\n<pre>ZipFile zip = <span style=\"color:blue\">new</span> ZipFile();\r\n\r\nzip.AddSelectedFiles(<span style=\"color:#a31515\">&quot;*.mp3&quot;</span>, <span style=\"color:#a31515\">@&quot;C:\\&quot;</span>, <span style=\"color:blue\">true</span>);\r\n\r\nzip.Save(<span style=\"color:#a31515\">&quot;C:\\\\teste.zip&quot;</span>);\r\n</pre>\r\n</div>\r\n<p></p>\r\n<p>&nbsp;</p>\r\n<p>My zip ends up with no files, but I do have files with .mp3 extension.</p>\r\n<p>Does anyone know what the problem is?</p>\r\n<p>Thanks.</p>\r\n",
    "PostedDate": "2011-10-13T11:36:50.553-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "683872",
    "ThreadId": "275798",
    "Html": "<p>I don't know but, to find out you might try the FileSelector class, also included in the DotNetZip library.&nbsp; you may be able to do some tests with it to figure out why you are seeing the behavior you are seeing.</p>\r\n<p>By the way, compressing MP3 files is not a productive activity. They are already compressed.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2011-10-13T11:41:10.44-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "683885",
    "ThreadId": "275798",
    "Html": "<p>Hi Cheeso,</p>\r\n<p>mp3 file is just an example. I am filtering some others extensions in my application.</p>\r\n<p>The problem is the directory to search, when I pass \"C:\\MyDirectory\" for example it works fine. But when I pass the whole driver C: anything happens.</p>\r\n<p>This code works fine:</p>\r\n<p>\r\n<div style=\"color: black; background-color: white;\">\r\n<pre>ZipFile zip = <span style=\"color: blue;\">new</span> ZipFile();\r\n                        \r\nzip.AddSelectedFiles(<span style=\"color: #a31515;\">\"*.mp3\"</span>, <span style=\"color: #a31515;\">@\"C:\\PastaTeste\"</span>, <span style=\"color: blue;\">true</span>);\r\n\r\nzip.Save(<span style=\"color: #a31515;\">\"C:\\\\teste.zip\"</span>);\r\n</pre>\r\n</div>\r\n</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2011-10-13T12:03:34.697-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "683895",
    "ThreadId": "275798",
    "Html": "<p>Hi,</p>\r\n<p>I resolved the problem using the FileSelector class. Here is the code:</p>\r\n<p>&nbsp;</p>\r\n<p>\r\n<div style=\"color: black; background-color: white;\">\r\n<pre>ZipFile zip = <span style=\"color: blue;\">new</span> ZipFile();\r\n\r\nFileSelector fs = <span style=\"color: blue;\">new</span> FileSelector(<span style=\"color: #a31515;\">\"*.mp3\"</span>);            \r\nzip.AddFiles(fs.SelectFiles(<span style=\"color: #a31515;\">@\"C:\\\"</span>, <span style=\"color: blue;\">true</span>), <span style=\"color: blue;\">true</span>, <span style=\"color: #a31515;\">\"C\"</span>);           \r\n\r\nzip.Save(<span style=\"color: #a31515;\">\"C:\\\\teste.zip\"</span>);\r\n</pre>\r\n</div>\r\n</p>\r\n<p>&nbsp;</p>\r\n<p>Thanks for the answer.</p>",
    "PostedDate": "2011-10-13T12:29:36.587-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]