title: How to extract ZIP files with WinRAR command line?
body: <p>While trying to extract zip files I get the error:</p>
  
  <blockquote>
    <p>c:\path\name.zip is not RAR archive<br>
    No files to extract</p>
  </blockquote>
  
  <p>My code is:</p>
  
  <pre><code>p.StartInfo.FileName = @"C:\Program Files\WinRAR\rar.exe";
  p.StartInfo.Arguments = string.Format("x -o- {2} \"{0}\" * \"{1}\"\\ ",
    szFN,
    outFolder,
    passWord == null ? "" : string.Format("-p\"{0}\"", passWord));
  </code></pre>
  
  <p>The GUI version can extract zip and 7z files.</p>
  
  <p>Why doesn't this work? How can I extract zip and 7z files?</p>
  
  <p>(NOTE: I have different source code for 7zip. I guess I can merge the two and only use the above when the file has a rar extension. But I don't like that solution.)</p>