Batch processing in C#

  • Thread starter Thread starter ludwig_stuyck
  • Start date Start date
L

ludwig_stuyck

Hi,
does someone has some links to information about how I would approach
and implement batch processing in C#?
Thanks!
Kind regards,
Ludwig
 
Hi,
does someone has some links to information about how I would approach
and implement batch processing in C#?
Thanks!
Kind regards,
Ludwig

you mean how to run a batch file?this code below will run a system
command:
{
ProcessStartInfo psiOpt = new ProcessStartInfo(@"cmd.exe", @"/c dir");
psiOpt.WindowStyle = ProcessWindowStyle.Normal;
psiOpt.RedirectStandardOutput = true;
psiOpt.UseShellExecute = false;
psiOpt.CreateNoWindow = true;
// Create the actual process object
Process procCommand = Process.Start(psiOpt);
// Receives the output of the Command Prompt
StreamReader srIncoming = procCommand.StandardOutput;
// Show the result
MessageBox.Show(srIncoming.ReadToEnd());
// Close the process
procCommand.WaitForExit();
}
 
Hi,

As mentioned by NoLogo, you could invoke the Command Shell to run the .BAT
file. Apart of that if you are interested to execute some functions as a
sequence of processes, you could try that with the Threading mechanism.

Thus, try to mention your requirement in more detail.

HTH
 
Hi,

As mentioned by NoLogo, you could invoke the Command Shell to run the .BAT
file. Apart of that if you are interested to execute some functions as a
sequence of processes, you could try that with the Threading mechanism.

Thus, try to mention your requirement in more detail.

HTH






- Tekst uit oorspronkelijk bericht weergeven -

Yes, you are right. I will ask for more information first, to see what
the lcient really wants.
 
Back
Top