How do I execute a shell command and capture the standard output

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How do I execute a shell command and capture the standard output

Dino Rosati
I would like to issue a command that is executed in a command (console)
window and get the output.
For example:

'dir *.*' execIn: 'c:\temp'  "Ctrl-D will display the resulting text from
the console window"
Ideally I would like to be able to do this without actually seeing the
console window (i.e. run it minimized or invisible).

I would also be nice if I didn't need to resort to creating a batch file
with the command in it and redirecting its output to a temp file etc.

Is there a way to do this?

Thanks in advance,
Dino