Results 1 to 4 of 4

Thread: piping with vb

  1. #1

    Thread Starter
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    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
    [email protected]
    [email protected]
    ICQ#: 51055819


  2. #2
    Member
    Join Date
    Nov 1999
    Location
    Princeton, New Jersey
    Posts
    46

    Post

    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.

  3. #3
    Member
    Join Date
    Oct 1999
    Location
    Fremont, Ca, 94538
    Posts
    40

    Post

    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

  4. #4
    Member
    Join Date
    Oct 1999
    Location
    Fremont, Ca, 94538
    Posts
    40

    Post

    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width