I have a big batch file with PING and Iperf tests and it works, everything is written in a .txt file, I only want to see what is going on in the PING test for example, apparently >> command only writes to the text file. My solution is to send one time the PING without the >> to write to the file and another one with the >> to write to the file but this takes a lot of time for the purpose of the batch file.
Can anyone help me with a simpler solution?
thanks here is part of the code:
ECHO.
(
ECHO Test started on %DATE% %TIME%
C:\Windows\System32\ping.exe %SERVER% | findstr /r /c:"[0-9] *ms"
if %errorlevel% == 0 (
echo.
echo TEST de PING OK ! next test iPERF
) else (
echo TEST de PING NOK
ECHO Done
PAUSE
EXIT
)
) >> "%LOGFILE%.client.log"