title: Get Multiple Files Path with Right Click
body: <p>I have added my application to the right click menu of Windows with the help of the registry</p>
  
  <blockquote>
    <p>"C://myapp.exe "%1" </p>
  </blockquote>
  
  <p>I am able to get the path of the selected file in a <code>MessageBox</code> using the below code. </p>
  
  <pre><code>static void Main(string[] args)
  {
     foreach (string path in args)
     {
         MessageBox.Show(path);  
     }
  }
  </code></pre>
  
  <p>It is okay if I want to open a single file, but if I select multiple files, it runs multiple instances of my application.  I need the path of all selected file in the single instance only.  Can anyone give me an idea of how to do this?</p>