Command Line Redirect to Program

G

Guest

I am looking for a command line command which will redirect the output of one
command into the input of the second program much like "|" but with a twist.
I want the second program to take in the passed parameters after the calling
program
Run program1.exe
Output: parameter1 parameter2
Now take these two parameters into program2.exe like this:
program2.exe parameter1 parameter2

This does not work: program1 | program2 because this would be like
program 1 (outputs parameter1 parameter2)
parameter1 parameter2 program.exe

Thanks for your help.
Jason Ryon
 
P

Pegasus \(MVP\)

Jason Ryon said:
I am looking for a command line command which will redirect the output of one
command into the input of the second program much like "|" but with a twist.
I want the second program to take in the passed parameters after the calling
program
Run program1.exe
Output: parameter1 parameter2
Now take these two parameters into program2.exe like this:
program2.exe parameter1 parameter2

This does not work: program1 | program2 because this would be like
program 1 (outputs parameter1 parameter2)
parameter1 parameter2 program.exe

Thanks for your help.
Jason Ryon

Try this:

@echo off
for /F "tokens=*" %%* in ('FirstApp.exe') do SecondApp.exe %%*
 

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