In TCC 22 it stopped working. TCC ignores this line in TCSTART.BTM and stubbornly logs into "%ProgramData%\JP Software\Take Command 22\TCCommandLog". Can you fix it?
Don't know why a line in your tcstart.btm is being ignored. Perhaps something is overriding your tcstart.btm setting.
I also use the TCC "options->TCC->Startup->Logging" settings to define my log file name. These can contain internal variables/functions like %@path[%_cmdspec]......
These setting will appear in the tcmd.ini file as HistLogName, LogName, and LogerrorsName. You may want to check in your tcmd.ini file to make sure these log file names are set to what you want to use as a logging file.
Here is how I set the log file name in my tcstart.btm file. These lines are executed in the 1st 8 or so lines of tcstart.
iff isfile "C:\jpsoft\varlist-master.lst" then
*set /r "C:\jpsoft\varlist-master.lst"
(Beep & echo ^n^t Unable to locate "C:\jpsoft\varlist-master.lst" file ^n)
The varlist-master.lst contains all of the variables that are common to my TCC startups for all versions.
These are from varlist-master.lst:
: Used to name the session's log file; expanded when used in a command.
: LogFile NO termination backslash \
Now, having set the variable "LogFile" I now can use this variable to make sure that history logging goes where I want.
echo ^n "%_batchname" [%_pid%] executed successfully %_date %_time) >>! %logfile
In all this, as Vince stated, the Options dialog settings (tcmd.ini) will take precedence
. This is the best place to set a default log file. As illustrated above I use a fully quilified path and file name in my TCC Options.
Using *log /w %logfile and *log /w /h %logfile will change the logging file to %logfile, but must be executed after tcmd.ini is read
if you intend to change the TCC options defaults.