rem redirect just stdout logging both to err.log and the more command. javac.exe *.java | tee err.log | more rem redirect both stdout and stderr, logging both to err.log and the more command. javac.exe *.java |& tee err.log |& more