redirecting STD_ERR to a file, via the command line

  • Thread starter Thread starter yawnmoth
  • Start date Start date
Y

yawnmoth

Running d2ir from a specific directory (actually, almost any directory,
heh) results in the following error:

'd2ir' is not recognized as an internal or external command, operable
program or batch file.

My question is... how would I go about saving that error message into
a file? "d2ir > c:\test.txt" doesn't work. A Google search suggested
that "d2ir 2>&1 c:\test.txt" might work, but it doesn't seem to. So
any ideas what will?
 
Your program can't be found so there is nothing to redirect from your program. Why would you not expect this message from cmd.exe when running an arbitrary command.
 
David said:
Your program can't be found so there is nothing to redirect from your program. Why would you not expect this message from cmd.exe when running an arbitrary command.

Maybe for the same reason that I would even bother running an arbitrary
command in the first place? ie. to provide the most basic version of
the problem that I can so as to make it that much easier for those who
might help to help?

If I write a 200kb program and am having a problem, which do you think
will get me better help?

1. Posting the full 200kb program and describe the problem.
or...
2. Reducing the problem down to its most basic elements and posting
them while also describing the problem.

Although you may think the correct answer is (1), you'd be wrong. It's
(2). Doing (2) shows that I've actually made an attempt to fix the
problem on my own (whereas (1) doesn't), makes it much more convenient
for others to actually find / fix the problem, etc.

(2) is what I've done. I've attempted to reduce the problem to its
most basic components. Unfortunately, there are always a few people
who will completly miss the point...
 
yawnmoth said:
Running d2ir from a specific directory (actually, almost any directory,
heh) results in the following error:

'd2ir' is not recognized as an internal or external command, operable
program or batch file.

My question is... how would I go about saving that error message into
a file? "d2ir > c:\test.txt" doesn't work. A Google search suggested
that "d2ir 2>&1 c:\test.txt" might work, but it doesn't seem to. So
any ideas what will?

d2ir 2>junk.txt

The "2" before the redirection sends STDERR to the nominated file (>> in
place of > APPENDS rather than restarts the file)

HTH

....Bill
 
billious said:
<snip>

d2ir 2>junk.txt

The "2" before the redirection sends STDERR to the nominated file (>> in
place of > APPENDS rather than restarts the file)

That worked - thanks! :)
 
Back
Top