通常、存在しないファイルをコピーしようとすると、次のエラー メッセージが表示されます。
C:\temp>copy foo bar
The system cannot find the file specified.
エラー メッセージは STDERR に書き込まれると予想されますが、STDOUT に書き込まれるようです。
C:\temp>copy foo bar >out
C:\temp>dir
Directory of C:\temp
23/09/2019 16:18 44 out
1 File(s) 44 bytes
0 Dir(s) 885,229,346,816 bytes free
C:\temp>type out
The system cannot find the file specified.
STDERRをSTDOUTとは別にリダイレクトした場合も同じことが起こるようです。
C:\temp>del out
C:\temp>copy foo bar 2>err >out
C:\temp>dir
Directory of C:\temp
23/09/2019 16:10 0 err
23/09/2019 16:10 44 out
2 File(s) 44 bytes
0 Dir(s) 885,226,635,264 bytes free
C:\temp>type out
The system cannot find the file specified.
私はWindows 10を使用しています
C:\temp>ver
Microsoft Windows [Version 10.0.18362.356]
COPY がエラー メッセージを STDERR に書き込まないのはなぜですか? この動作はどこに文書化されていますか?