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.
Code:
iff isfile "C:\jpsoft\varlist-master.lst" then
*set /r "C:\jpsoft\varlist-master.lst"
else
(Beep & echo ^n^t Unable to locate "C:\jpsoft\varlist-master.lst" file ^n)
endiff
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:
Code:
: Used to name the session's log file; expanded when used in a command.
fldate=%@formatn[02.0,%_day]_%_imonth%_%_year
: LogFile NO termination backslash \
LogFile="%@truename[%@path[%_cmdspec]logs\TC%fldate.log]"
Now, having set the variable "LogFile" I now can use this variable to make sure that history logging goes where I want.
Example:
Code:
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.