When running programs, I sometimes use
xxx 1> xxx.log 2>&1
From the cmd prompt, all echos go to output 1 and all errors go to output 2.
In a C program, output 1 is stdout and output 2 is stderr.
From a batch script, is it possible to write to output 2?