redirect-windows-cmd-stdout-and-stderr-to-a-single-file

https://*.com/questions/1420965/redirect-windows-cmd-stdout-and-stderr-to-a-single-file

You want:

dir > a.txt 2>&1
The syntax 2>&1 will redirect 2 (stderr) to 1 (stdout). You can also hide messages by redirecting to NUL, more explanation and examples on MSDN

redirect-windows-cmd-stdout-and-stderr-to-a-single-file

上一篇:window.onload 和 $(function) 区别


下一篇:Win10系统下安装的Office版本的说明和注意事项