I would like to run commands on the Command Prompt window and capture their output. What is the best way to do that ? (Shell function doesn't work for me, cause it doesn't return the output).
Yaron.
Printable View
I would like to run commands on the Command Prompt window and capture their output. What is the best way to do that ? (Shell function doesn't work for me, cause it doesn't return the output).
Yaron.
You can try re-directing to a output file then parsing the file..
shell "MYDOSAPP.EXE > RESULT.TXT"
then open RESULT.TXT. it's crude but it may work for you.
Check "Capturing the Output of a MS-DOS Program" at
http://www.**************/ArticleBank...ID=ArticleBank
JD
Redirecting the output to a file works if the command executes fully without further input, but what if I want to capture the output of a complete FTP session ? That involves reading process output throughout the entire session, and not just at the end of it. I want to be able to read the output at the moment that it's sent out , and not at the end of the session.
Something that is similiar to PERL's Expect module.
Know how I can do this?
Yaron.