How do I send a message to stderr from cmd?

Viewed 29078

In a standard windows .cmd file I can send messages to stdout simply by doing:

echo message

How can I send a message to stderr?

Example:

Let's say I have the script parent.cmd containing:

call child.cmd 1>>stdout.log 2>>stderr.log

and a child containing:

:: Writes a message to stdout 
:: (which in the parent is piped to stdout.log)
echo message

:: Now I want to write a message to stderr 
:: (which in the parent is piped to stderr.log)
???
2 Answers
Related