Обычно при попытке скопировать несуществующий файл вы получаете сообщение об ошибке:
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? Где это поведение задокументировано?