|nbrane's method should work but there are more convenient|
Perhaps sending the echo output to either "con" or "stderr" is a
good solution. Using con would ensure that it always gets
sent to the console regardless, while using stderr gives the
option of redirecting the output at startup.
FOR /F %%z IN (list.txt) DO (
set line=!date! !time! %%C
psexec \\%%z "C:\WINDOWS\system32\calc.exe" >nul 2>&1 || set line=!line! Error
rem sending to stderr
1>&2 ECHO launching program on computer %%z
rem sending to "con"
>con ECHO launching program on computer %%z
If you use something like this to start the batch the you can
redirect the echo sent to stderr, but not the echo sent to "con".