Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

echox commands are not logged in the CommandLog

Jun
149
13
Executing this BTM

Code:
@echo off
setlocal
log /E /w "E:\Floppy\TCErrorLog.txt"
log /A /w "E:\Floppy\TCLogAll(Output).txt"
log /w "E:\Floppy\TCCommandLog(AftVarExp).txt"

Echo Good Morning
Echox Good Afternoon
echos Good night
echo !

:END
endlocal
log OFF
log /A OFF
log /E OFF

results in a CommandLog - TCCommandLog(AftVarExp).txt" - that looks like this.

Code:
[ 8/17/26 12:18:17p][30588] Echo Good Morning
[ 8/17/26 12:18:17p][30588] echos Good night
[ 8/17/26 12:18:17p][30588] echo !
[ 8/17/26 12:18:17p][30588] endlocal
[ 8/17/26 12:18:17p][30588] MapExe /D /N * >& nul
[ 8/17/26 12:18:17p][30588] log OFF

The echox command is missing.
 
WAD. Neither does ECHOXERR or REM.

TCC looks for and executes ECHOX and ECHOXERR before doing any parsing of the command line (including logging, which is done after all variable substitution and redirection).

This is 30+ year old behavior. Though the help doesn't explicitly say this, it is strongly implied.
 
Thanks for the explanation. That make sense.

It wasn't a big issue for me...it just caught me by surprise when I was trying to trace through what was being executed by following the commandlog and some commands I expected to see weren't there.
 
Back
Top