I would like to execute a shell line using---> Process myProcess = new Process();
the line is something like:
pathMyProgram -options < file.txt
I have done
Process pProcess = new System.Diagnostics.Process();
pProcess.StartInfo.FileName=pathMyProgram;
pProcess.StartInfo.Arguments=-optins < file.txt
... but it doesn`t work ( due to the redirection...)
So after reading I have tried
enter code here
Process pProcess = new System.Diagnostics.Process();
pProcess.StartInfo.FileName=pathMyProgram;
pProcess.StartInfo.Arguments=-optins
myProcess.StartInfo.UseShellExecute = false;
myProcess.StartInfo.RedirectStandardInput = true;
pProcess.Start();
pProcess.StandardInput.WriteLine(file.txt);
and it continue without working, any help?