473,395 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

when i use Process.Start() and dos command < or >

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 .

i just wanna use this when i use Process.Start() method.
but < is not recongnise a parameter .
how can i do?
Nov 29 '06 #1
6 2620
Hi,

You could but the commands into a batch file and run that from
Process.Start()

--
Dave Sexton

"somequestion" <so**********@gmail.comwrote in message
news:ew*************@TK2MSFTNGP02.phx.gbl...
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 .
i just wanna use this when i use Process.Start() method.
but < is not recongnise a parameter .
how can i do?


Nov 30 '06 #2
Hi,

"but" = "put" ;)

--
Dave Sexton

"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:OG*************@TK2MSFTNGP06.phx.gbl...
Hi,

You could but the commands into a batch file and run that from
Process.Start()

--
Dave Sexton

"somequestion" <so**********@gmail.comwrote in message
news:ew*************@TK2MSFTNGP02.phx.gbl...
>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 .
i just wanna use this when i use Process.Start() method.
but < is not recongnise a parameter .
how can i do?



Nov 30 '06 #3
did you test this?
it won't be work...... or < is not recongnise a parameter
that's why it won't be work

"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:OG*************@TK2MSFTNGP06.phx.gbl...
Hi,

You could but the commands into a batch file and run that from
Process.Start()

--
Dave Sexton

"somequestion" <so**********@gmail.comwrote in message
news:ew*************@TK2MSFTNGP02.phx.gbl...
>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 .
i just wanna use this when i use Process.Start() method.
but < is not recongnise a parameter .
how can i do?


Nov 30 '06 #4
"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
Nov 30 '06 #5
Hi,

That's why I suggested to put it into a batch file, then execute the batch
file. In other words, a batch file that executes a batch file.

If "parameter" is something that needs to be supplied from managed code, it
can be passed in as an argument to the new batch file:

"Process.Start Method (String, String)"
http://msdn2.microsoft.com/en-us/library/h6ak8zt5.aspx

--
Dave Sexton

"PointMan" <so**********@gmail.comwrote in message
news:ef**************@TK2MSFTNGP02.phx.gbl...
did you test this?
it won't be work...... or < is not recongnise a parameter
that's why it won't be work

"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:OG*************@TK2MSFTNGP06.phx.gbl...
>Hi,

You could but the commands into a batch file and run that from
Process.Start()

--
Dave Sexton

"somequestion" <so**********@gmail.comwrote in message
news:ew*************@TK2MSFTNGP02.phx.gbl...
>>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 .
i just wanna use this when i use Process.Start() method.
but < is not recongnise a parameter .
how can i do?



Nov 30 '06 #6
The < and characters are reserved by the command interpreter. They are
pipe redirection symbols. In order to pass them as arguments, put the caret
(^) immediately before them.

To pass ^>
To pass < ^<

Other characters like this are & | ( ) and ^.

Mike Ober.

"somequestion" <so**********@gmail.comwrote in message
news:ew*************@TK2MSFTNGP02.phx.gbl...
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 .
i just wanna use this when i use Process.Start() method.
but < is not recongnise a parameter .
how can i do?


Nov 30 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Patrick | last post by:
I understand that with IIS5.1 on Windows XP Professional SP1, I can 1) Either set under IIS Manager-> Any specific Virtual Directory-> Configuration->Options->ASP Script timeout for all pages...
11
by: Les Paul | last post by:
I'm trying to design an HTML page that can edit itself. In essence, it's just like a Wiki page, but my own very simple version. It's a page full of plain old HTML content, and then at the bottom,...
0
by: Mate Visky | last post by:
hi, i have a little problame. i got this xml file: ---- <?xml version="1.0" encoding="UTF-8" ?> - <out> - <design> - <html> - <!]> </html>
2
by: Frank van Vugt | last post by:
Hi, Not exactly a showstopper, but I noticed this behaviour: db=# create table f1 (id int, value int); CREATE TABLE db=# insert into f1 select 1 as id, null; INSERT 25456306 1
10
by: Matt Kruse | last post by:
See: http://www.mattkruse.com/temp/offsetleft.html It appears that the offsetLeft value in IE6 (other versions not tested) incorrectly ignores the border width on a DIV when there is a width:...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
9
by: gelangov | last post by:
I have 2 variables, one is the column name of the table and the other one is the table name and I need to write this in the "Execute SQL task" of a "For each loop" container in a ssis package like...
1
by: Sebarry | last post by:
Hi, I'm trying to read the results of a database query into an XML document but it's only read so far and stopping. The XML document is as follows: <?xml version="1.0" encoding="utf-8"?> ...
2
by: JamesDelaney | last post by:
Hi all, I'm creating a number of fragments to calculate various presence numbers. I'm creating variables from the results of these fragments then doing simple math to give the results. I'm...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.