相关疑难解决方法(0)

将Windows cmd标准输出和stderr重定向到单个文件

我正在尝试将DOS命令的所有输出(stdout + stderr)重定向到单个文件:

C:\>dir 1> a.txt 2> a.txt
The process cannot access the file because it is being used by another process.
Run Code Online (Sandbox Code Playgroud)

是可能的,还是应该重定向到两个单独的文件?

windows command-line cmd pipe

656
推荐指数
7
解决办法
44万
查看次数

标签 统计

cmd ×1

command-line ×1

pipe ×1

windows ×1