[
  {
    "Id": "580387",
    "ThreadId": "249684",
    "Html": "\r\n<p>I have the following website code which extracts one file from a zip file, but appears to be having problems if there are parens () in the file name.&nbsp; Here is a code fragment.</p>\r\n<p>strFileName = &quot;003Monthly Charges 01-2011 (updated).xls&quot;</p>\r\n<p>ObjUnZip.ExtractSelectedEntries(&quot;name = '&quot; &amp; strFileName &amp; &quot;'&quot;, &quot;&quot;, MapPath(Report_Export_Path),\r\n<span style=\"font-size:x-small\">ExtractExistingFileAction.OverwriteSilently)</span></p>\r\n<p><span style=\"font-size:x-small\">This code works for file names with spaces in the name, but does not extract if there are parens.&nbsp; Any help would be appreciate as this is my only application that unzips files and I am relatively new to using dotnetzip.</span></p>\r\n<p><span style=\"font-size:x-small\">&nbsp;</span></p>\r\n<p><span style=\"font-size:x-small\">&nbsp;</span></p>\r\n",
    "PostedDate": "2011-03-14T15:32:35.397-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "580682",
    "ThreadId": "249684",
    "Html": "<p>I'll have to look into this. will get back to you.</p>",
    "PostedDate": "2011-03-15T05:19:01.953-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "581073",
    "ThreadId": "249684",
    "Html": "<p>Yes, this is a bug in the file selector logic.&nbsp;&nbsp; I'll have to apply a fix.</p>",
    "PostedDate": "2011-03-15T16:48:30.86-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "581074",
    "ThreadId": "249684",
    "Html": "This discussion has been copied to a work item. Click <a href=\"http://dotnetzip.codeplex.com/workitem/13187\">here</a> to go to the work item and continue the discussion.",
    "PostedDate": "2011-03-15T16:57:13.48-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "581445",
    "ThreadId": "249684",
    "Html": "<p>Thanks for investigating this issue.&nbsp; I found that I also had a second problem which caused an extract to fail.&nbsp; When I was looking for the filename of 'file1.xls', I found that the value of ZipEntry.FileName was actually 'folderA/file1.xls' and therefore the file was not extracted (probably due to options passed to an old version of the tool used to add to the zip files which used a now obsolete library).&nbsp; I had to change to the following code to find the file, regardless of how the filename was stored in the zip file.</p>\r\n<p>Dim ObjUnZip As ZipFile</p>\r\n<p>Dim ObjZipEntry as ZipEntry</p>\r\n<p>For Each objZipEntry In ObjUnZip.Entries<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If objZipEntry.IsDirectory Then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'do nothing<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If objZipEntry.FileName.Equals(strFileName) Or objZipEntry.FileName.EndsWith(\"/\" &amp; strFileName) Then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objZipEntry.Extract(MapPath(REPORT_EXPORT_PATH), ExtractExistingFileAction.OverwriteSilently)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strFoundFileName = objZipEntry.FileName<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End If<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End If</p>\r\n<p>Next</p>\r\n<p>Do you have any suggestions about setting the parameters of ExtractSelectedEntries so that these filenames would also be found?</p>",
    "PostedDate": "2011-03-16T07:31:45.427-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "581990",
    "ThreadId": "249684",
    "Html": "<p>yes - use a wildcard. for example:</p>\r\n<p>&nbsp; name = */file.xls</p>\r\n<p>should work.</p>",
    "PostedDate": "2011-03-17T03:38:12.443-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "582057",
    "ThreadId": "249684",
    "Html": "<p>When I go to extract the file 'file.xls' from a zip file, but I do not know whether&nbsp;the ZIpEntry.FileName is&nbsp;'file.xls' or 'folder/file.xls', what would I pass to ExtractSelectedEntries so that I would find the file?&nbsp; Is there the ability to match 'basename' where it matches just the file name and ignores any folders that are in ZipEntry.FileName?</p>\r\n<p>I appreciate your help.&nbsp; Since I was moving an existing website, I had to stick with the loop above as my customers had trouble for 2 days downloading some files from the zip files before I got it working correctly all of the time.</p>",
    "PostedDate": "2011-03-17T06:26:27.157-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "583288",
    "ThreadId": "249684",
    "Html": "<p>I think</p>\r\n<p>name = ./*/basename.xls</p>\r\n<p>...should work.</p>\r\n<p>did you try that?</p>",
    "PostedDate": "2011-03-20T06:35:14.67-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "583809",
    "ThreadId": "249684",
    "Html": "<p>Thanks.&nbsp; I just tried that and it solves my second problem.&nbsp; How do I find out when the updated library is available&nbsp;that fixes&nbsp;the first problem?</p>",
    "PostedDate": "2011-03-21T09:26:17.78-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]