Batch processing in C#

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
 
N

nologo

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();
}
 
D

DSK Chakravarthy

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
 
L

ludwig_stuyck

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top