title: how to make rar file of full folder using c#
body: <p>I have a procedure for making .rar file.</p>
  <h2>Code</h2>
  <pre><code>    public static void RarFilesT(string rarPackagePath, Dictionary&lt;int, string&gt; accFiles)
      {
          string[] files = new string[accFiles.Count];
          int i = 0;
          foreach (var fList_item in accFiles)
          {
              files[i] = &quot;\&quot;&quot; + fList_item.Value;
              i++;
          }
          string fileList = string.Join(&quot;\&quot; &quot;, files);
          fileList += &quot;\&quot;&quot;;
          System.Diagnostics.ProcessStartInfo sdp = new System.Diagnostics.ProcessStartInfo();
          string cmdArgs = string.Format(&quot;A {0} {1} -ep&quot;,
              String.Format(&quot;\&quot;{0}\&quot;&quot;, rarPackagePath),
              fileList);
          sdp.ErrorDialog = true;
          sdp.UseShellExecute = true;
          sdp.Arguments = cmdArgs;
          sdp.FileName = rarPath;//Winrar.exe path
          sdp.CreateNoWindow = false;
          sdp.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
          System.Diagnostics.Process process = System.Diagnostics.Process.Start(sdp);
          process.WaitForExit();
      }
  </code></pre>
  <p>This producer needs an string array of file list for making rar file.
  Can any one tell me how can i make rar of a complete folder with sub folders and files.
  Sorry 1 mistake and i also need selected extension files from given folder.</p>