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
精彩评论