piping to another command

J

James

i have a password.txt file that contain a password, say abc.

I need to run a decryption program and the software requires a passphase.
When manually run the decryption.exe file, it prompts

Enter passphase : <when i type password manually, screen suppose to be
blank, followed by enter>

therefore i thought of piping the password to the program by creating a
batch file

mybatch.bat
=========

decryption.exe | type password.txt

And the screen shows

Enter passphase : abc (and stops here)

When i press enter, it prompts

Enter passphase : <blank and it expects me to type a password>

How shld i pipe out correctly ?
 
M

Marty List

James said:
i have a password.txt file that contain a password, say abc.

I need to run a decryption program and the software requires a passphase.
When manually run the decryption.exe file, it prompts

Enter passphase : <when i type password manually, screen suppose to be
blank, followed by enter>

therefore i thought of piping the password to the program by creating a
batch file

mybatch.bat
=========

decryption.exe | type password.txt

And the screen shows

Enter passphase : abc (and stops here)

When i press enter, it prompts

Enter passphase : <blank and it expects me to type a password>

How shld i pipe out correctly ?


Make sure password.txt contains a linefeed (press enter) after the password.

Try one of these:
type password.txt|decryption.exe
decryption.exe<password.txt

For more info, go to Start -> Help and Support and search for "using command
redirection operators".
 

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