[
  {
    "Id": "642940",
    "ThreadId": "265307",
    "Html": "<p>I was trying to use ExtractSelectedEntries in powershell. Simpliest try was something like this</p>\n<div style=\"color: black; background-color: white;\">\n<pre>\r\n\r\n<span style=\"color: orangered;\">$zipfile</span> <span style=\"color: gray;\">=</span> <span style=\"color: gray;\">[</span><span style=\"color: teal;\">Ionic.Zip.ZipFile</span><span style=\"color: gray;\">]</span><span style=\"color: gray;\">::</span>Read(<span style=\"color: orangered;\">$sourceFile</span>)             \r\n<span style=\"color: orangered;\">$zipfile</span>.ExtractSelectedEntries(<span style=\"color: #a31515;\">\"name=*\"</span>, <span style=\"color: #a31515;\">\"\\a\\b\\c\"</span>, <span style=\"color: #a31515;\">\"c:\\output\"</span>)\r\n<span style=\"color: orangered;\">$zipfile</span>.Dispose() \r\n</pre>\n</div>\n<div style=\"color: black; background-color: white;\"></div>\n<p>But it just returned NameCriterion regexString(^.*$) and nothing was extracted.<br />What was I doing wrong here?</p>",
    "PostedDate": "2011-07-15T07:18:25.7-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "642948",
    "ThreadId": "265307",
    "Html": "<p>I already did this one on my own.<br />Correct criteria for ArchiveFolder is without leading \\. That is</p>\r\n<div style=\"color: black; background-color: white;\">\r\n<pre><span style=\"color: orangered;\">$zipfile</span>.ExtractSelectedEntries(<span style=\"color: #a31515;\">\"name=*\"</span>, <span style=\"color: #a31515;\">\"a\\b\\c\"</span>, <span style=\"color: #a31515;\">\"c:\\output\"</span>)</pre>\r\n</div>",
    "PostedDate": "2011-07-15T07:40:40.21-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "642957",
    "ThreadId": "265307",
    "Html": "<p>But I got into another problem. Given example extracts just files in<span style=\"color: #a31515;\"> \\a\\b\\c </span>archive folder, but no subfolders.<br />How could I extract all subfolders (recusively) for given archive folder?</p>",
    "PostedDate": "2011-07-15T07:57:14.37-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "643062",
    "ThreadId": "265307",
    "Html": "<p>Dragan, I believe you want something like \"a\\b\\c\\*\\*.*\"</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2011-07-15T11:12:37.173-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "643126",
    "ThreadId": "265307",
    "Html": "<p>I tried it like this.</p>\r\n<pre><span style=\"color: orangered;\">$zipfile</span>.ExtractSelectedEntries(<span style=\"color: #a31515;\">\"name=*\"</span>, <span style=\"color: #a31515;\">\"a\\b\\c\\*\\*.*\"</span>, <span style=\"color: #a31515;\">\"c:\\output\"</span>)</pre>\r\n<p>but this extracted&nbsp; just nothing at all.</p>\r\n<p>What I need is to extract one folder from the zip file, but with all files and subfolders recursively. <br />Is there one liner for it, or should I write the function that does tree walk and?</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2011-07-15T13:21:16.957-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "643182",
    "ThreadId": "265307",
    "Html": "<p>I'm sorry, I wasn't paying attention.&nbsp; I meant that you should try, as your criteria string, 'name=a\\b\\c\\*\\*.*'</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2011-07-15T17:18:21.68-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "643308",
    "ThreadId": "265307",
    "Html": "<p>I tried<br />$zipfile.ExtractSelectedEntries('name=a\\b\\c\\*\\*.*', 'a\\b\\c', \"e:\\users\\dragan\\DotNetZip\\output\")<br />but it extracts nothing.</p>\r\n<p>Note that<br />$zipfile.ExtractSelectedEntries('name=a\\b\\c\\*\\*.*', 'a\\b\\c', \"e:\\users\\dragan\\DotNetZip\\output\")<br />at least does extract files from folder a\\b\\c, but it does not extract subfolder a\\b\\c\\d</p>\r\n<p>More ideas?</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2011-07-16T12:10:05.63-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "643589",
    "ThreadId": "265307",
    "Html": "<p>I tried just simple</p>\r\n<div style=\"color: black; background-color: white;\">\r\n<pre><span style=\"color: orangered;\">$zipfile</span>.ExtractSelectedEntries(<span style=\"color: #a31515;\">'name=a\\b\\c\\*'</span>)\r\n</pre>\r\n</div>\r\n<p>It works perfectly. But what I need is to define output folder, therefore I need&nbsp;&nbsp;ExtractSelectedEntries(String, String, String).<br />I was trying to use $null for second parameter eg.</p>\r\n<div style=\"color: black; background-color: white;\">\r\n<pre><span style=\"color: orangered;\">$zipfile</span>.ExtractSelectedEntries(<span style=\"color: #a31515;\">'name=a\\b\\c\\*'</span>, <span style=\"color: orangered;\">$null</span>, <span style=\"color: #a31515;\">\"e:\\users\\dragan\\DotNetZip\\output\"</span>)\r\n</pre>\r\n</div>\r\n<p>but this extracts nothing.</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2011-07-18T00:59:34.427-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "644323",
    "ThreadId": "265307",
    "Html": "<p>Try using the empty string, instead of null, for that 2nd parameter.&nbsp; eg, \"\"</p>",
    "PostedDate": "2011-07-19T06:17:12.38-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "644358",
    "ThreadId": "265307",
    "Html": "<p>I was trying this already, but it did not work.</p>\r\n<p>I did&nbsp;workaround. I set directory for writing with [System.IO.Directory]::SetCurrentDirectory, than use ExtractSelectedEntries with just one parameter.<br />I have working solution now, but if&nbsp;better solution occures I would be still interested in it.</p>\r\n<p>thanks for response</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2011-07-19T07:16:22.517-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]