开发者

Output of Batch file with a number of cmd commands saved in a single text file

开发者 https://www.devze.com 2023-03-29 14:24 出处:网络
I am trying to get the outp开发者_StackOverflowut of my batch file into a text file. I know by using \'>\'

I am trying to get the outp开发者_StackOverflowut of my batch file into a text file. I know by using '>' I can get the standard output stream text, however in this case the batch file has multiple cmd commands and I don't know how to get outputs for each of this into a text file.

Any help is greatly appreciated.


Hope this helps

@echo off
rem start the file with a single >
echo test1 > file.txt
rem append the file with a double >>
echo test2 >> file.txt
type file.txt
0

精彩评论

暂无评论...
验证码 换一张
取 消