Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: [SOLVED] redirecting output  (Read 11389 times)

0 Members and 1 Guest are viewing this topic.

Two-eyes

    Topic Starter


    Intermediate
  • Thanked: 4
    Re: redirecting output
    « Reply #15 on: September 12, 2009, 07:21:34 AM »
    oh, that's nice
    Thanks :)
    ...
    What do you know?  I tried the first code you sent, and it worked(obviously).
    Then I tried this:
    Code: [Select]
    (ECHO hiya >doesnotexist\notextfile.txt) 2>error.txt
    and got a text file called error.txt saying "the path couldnt be found" (ie the output i wanted originally)

    dang...now I am even more curious ;D

    Thanks :)
    Quote
    I believe the bushes in my yard will BURN before God picks up a PC to send a message


    Salmon Trout

    • Guest
    Re: redirecting output
    « Reply #16 on: September 12, 2009, 07:50:52 AM »
    See my (edited) post No. 12 above.

    Two-eyes

      Topic Starter


      Intermediate
    • Thanked: 4
      Re: redirecting output
      « Reply #17 on: September 12, 2009, 07:58:47 AM »
      ooops  :-[
      Sorry, but you edited it twice, so I thought you meant the first edit.....my bad

      Thanks

      Two-Eyes
      Quote
      I believe the bushes in my yard will BURN before God picks up a PC to send a message


      Salmon Trout

      • Guest
      Re: redirecting output
      « Reply #18 on: September 12, 2009, 08:06:49 AM »
      ooops  :-[
      Sorry, but you edited it twice, so I thought you meant the first edit.....my bad

      Thanks

      Two-Eyes

      No, my bad, I forgot I had edited it twice (I can't remember what I wrote first!)

      Salmon Trout

      • Guest
      Re: [SOLVED] redirecting output
      « Reply #19 on: September 12, 2009, 08:29:23 AM »
      I think the answer is, that you know where the echo command ends but cmd.exe does not

      ECHO hiya >doesnotexist\notextfile.txt 2>error.txt

      it thinks this is the filename to echo hiya into:

      doesnotexist\notextfile.txt 2>error.txt

      But this way it knows

      (ECHO hiya >doesnotexist\notextfile.txt) 2>error.txt




      Two-eyes

        Topic Starter


        Intermediate
      • Thanked: 4
        Re: [SOLVED] redirecting output
        « Reply #20 on: September 12, 2009, 11:53:33 AM »
        ahhh yes.  The assumption "what I know, it knows".  I fall quite a few times in that. :)
        Quote
        I believe the bushes in my yard will BURN before God picks up a PC to send a message