将控制台输出重定向到文件不会工作

时间:2016-04-17 07:05:34

标签: windows batch-file io-redirection

我正在尝试将以下脚本的输出重定向到文件

REM go to the caffe root
cd ../../
set BIN=build/x64/Release
"%BIN%/caffe.exe" train --solver=examples/cifar10/cifar10_full_relu_solver_bn.prototxt

我试过了:

REM go to the caffe root
cd ../../
set BIN=build/x64/Release
"%BIN%/caffe.exe" train --solver=examples/cifar10/cifar10_full_relu_solver_bn.prototxt > caffe.log 

以及

REM go to the caffe root
cd ../../
set BIN=build/x64/Release
"%BIN%/caffe.exe" train --solver=examples/cifar10/cifar10_full_relu_solver_bn.prototxt 1> caffe.log 2>&1

但它们都不起作用 但它很奇怪,如果我使用像dir这样的简单的Windows命令,它可以工作,但不是我的应用程序的输出!
这里有什么不对?

0 个答案:

没有答案