"somequestion" <so**********@gmail.comwrote:
>there are some dos command < or >
it can use like this
if there is a batch file as sample.bat
sample.bat < parameter
sample.bat parameter result .
The topic is called "redirecting stdin/stdout of a child process".
..Net provides some support for it, e.g. here:
http://msdn.microsoft.com/library/de...utputTopic.asp
What you can do is take what you get from p.StandardOutput and put it
into your output file.
win32 also allows you to redirect stdin/stdout so they go directly to
files that you specify, rather than you having to access them via the
streams p.StandardOutput and p.StandardInput. I don't think this
functionality is exposed in .net. So if you wanted to do this, you
should look up CreateProcess/STARTUPINFO/STARTF_USESTDHANDLES.
--
Lucian