|I have created a .bat file which is running quite well. Thing is, now I would like to redirect the output to a logfile - that's not a big problem, but I would like to see the written log in parallel on the screen. |
Can you tell me how to enable that in my script?
E.g. like in Unix: script.sh 2>&1 | tee log.txt
Here is my script (it's just an example):
echo Before writing the log
echo Calling subroutine with log
(call :method) > log.txt | type log.txt
echo this is a test
exit /B 0
When I try to run it I get the following error:
Before writing the log
Calling subroutine with log
Ungültiger Versuch, ein Sprungziel außerhalb einer Batchdatei aufzurufen.
Do you have an idea?