I have added my application to the right click menu of Windows with the help of the registry
"C://myapp.exe "%1"
I am able to get the path of the selected file in a MessageBox
using the below code.
static void Main(string[] args)
{
foreach (string path in args)
{
MessageBox.Show(path);
}
}
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?