PDA

Click to See Complete Forum and Search --> : piping with vb


Serge
Dec 2nd, 1999, 12:11 AM
Are you trying to open this text file? If yes, then you can use something like this:


Call Shell("notepad temp.txt", vbNormalFocus


------------------

Serge

Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)

laudy
Dec 2nd, 1999, 03:09 AM
If you want to run something and pipe the output to a text file, try using the the /c option with command.com

Example:
Shell("command.com /c dir >>c:\temp.txt")

This works for me in NT:
Shell("cmd.exe /c dir >>c:\temp.txt")


Hope that helps.

dungism
Dec 2nd, 1999, 07:25 AM
Thank you all for the responses, but it capture the text from command dir, and not the stdout put from command.com. Are there any way to capture the stdout from a file? Thank you in advance

dungism
Dec 2nd, 1999, 11:42 AM
hi, i've tried to pipe with vb, but it just load the program in dos window and close it. My format is
Call shell("c:\command > temp.txt")
can anyone help me out with this?