redirect stdout and stderr from Windows shell

R

Ronald Fischer

How can I redirect stdout and stderr to the same file from a Windows
command line?

I know how to redirect them to different files:

myprog >stdout.log 2>stderr.log

but I need them in the same file.

Under bash, I would do a

myprog 2>&1 >myprog.log

Ronald
 
P

Pegasus \(MVP\)

Ronald Fischer said:
How can I redirect stdout and stderr to the same file from a Windows
command line?

I know how to redirect them to different files:

myprog >stdout.log 2>stderr.log

but I need them in the same file.

Under bash, I would do a

myprog 2>&1 >myprog.log

Ronald

Much the same under Windows:

myprog 1>stdout.log 2>&1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top