Batch script: save stdout and have the output in the console too

前端 未结 1 2003
名媛妹妹
名媛妹妹 2021-01-27 07:47

By default the output of commandline applications is presented in console window and I know that using > or >> we can re-wrire/append the stdo

相关标签:
1条回答
  • 2021-01-27 08:28

    Try something like this:

    @echo off
    echo hello > log.txt & type log.txt
    pause
    

    But using this you can only have one command-output in the log-file at once. You could try it with >> but that way you get the outputs of all commands every time you use this.

    0 讨论(0)
提交回复
热议问题