how to do cmd command csharp
Code Example - how to do cmd command csharp
string strCmdText;
strCmdText= "/C copy /b Image1.jpg + Archive.rar Image2.jpg";
System.Diagnostics.Process.Start("CMD.exe",strCmdText);
csharp execute shell command
System.Diagnostics.ProcessStartInfo process = new System.Diagnostics.ProcessStartInfo();
process.UseShellExecute = false;
process.WorkingDirectory = worikng_path;
process.FileName = command;
process.Arguments = command_arguments;
process.RedirectStandardOutput = true;
System.Diagnostics.Process cmd = System.Diagnostics.Process.Start(process);
// waiting to complete
cmd.WaitForExit();
how to start cmd in csharp
string strCmdText = "pip install -r requirements.txt";
Process.Start("CMD.exe", strCmdText);