1.

Solve : [SOLVED] redirecting output?

Answer»

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

Thanks See my (edited) POST No. 12 above.
ooops
Sorry, but you edited it twice, so I thought you meant the first edit.....my bad

Thanks

Two-EyesQuote from: Two-eyes 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

No, my bad, I forgot I had edited it twice (I can't remember what I wrote first!)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



ahhh yes. The assumption "what I know, it knows". I FALL quite a few times in that.


Discussion

No Comment Found