TCHistoryLog: TCC: (Sys) The system cannot find the path specified

Feb 1, 2010
38
0
#1
TCC 20.11.40 x64 Windows 7

On the very first command TCC prints out
TCC: (Sys) The system cannot find the path specified.
"C:\ProgramData\JP Software\Take Command 20\TCHistoryLog"

There is indeed no such file, however here [title] there is a different path: C:\Users\XXX\AppData\Local\JPSoft\TCHistoryLog.

TCC in fact eventually finds the right history file and continues to work correctly, but why it prints out an unsuccessful attempt?
 
Feb 1, 2010
38
0
#3
The \programdata directory is the correct (new) location for the log files, unless you've passed a different name
As I mentioned I set it to a different path. And it actually works correctly. But TCC prints an error message anyway.

LOG or in your TCMD.INI.
Do you mean that setting it in GUI doesn't work? Only INI file works correctly, I mean without printing the error message?
new-124.png
 
Feb 1, 2010
38
0
#5
You didn't say how you are setting it -- in a LOG statement? In TCSTART? in the TCMD options dialog? Somewhere else?
I am puzzled. In my very first message I quite clearly said where I set it. How is that equal to “I didn't say it”?
new-125.png
 

rps

Jul 6, 2008
307
4
#6
I am puzzled. In my very first message I quite clearly said where I set it. How is that equal to “I didn't say it”?
View attachment 1379
All that aside.

If you use something like *log /w /h C:\Users\XXX\AppData\Local\JPSoft\TCHistoryLog in your tcstart.btm file, do you see the error message?

If the error message continues try the above without your tcmd.ini settings for this history file.

These are just "shot in the dark" suggestions.
 
Feb 1, 2010
38
0
#8
If you use something like *log /w /h C:\Users\XXX\AppData\Local\JPSoft\TCHistoryLog in your tcstart.btm file, do you see the error message?
Yep, that helped. Thanks for the workaround!
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?
 

rps

Jul 6, 2008
307
4
#11
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.
 
Likes: Patulus
Feb 1, 2010
38
0
#13
Version 22.00.40. History file settings again don't work. This time nothing works: neither log /h /w in tcstart.btm, nor Options GUI dialog. TCC prints out
Code:
TCC: (Sys) Access denied.
 "C:\ProgramData\JP Software\Take Command 22\TCCommandLog"
after each command. %_LOGFILE returns an empty string.
 
Feb 1, 2010
38
0
#14
Ok, I was wrong about _LOGFILE, the history file is in _HLOGFILE.

Can you not ignore me? _HLOGFILE is correctly points to %[LOCALAPPDATA]\JPSoft\TCHistoryLog. Why on Earth TCC is trying to write the history to "C:\ProgramData\JP Software\Take Command 22\TCCommandLog"?
 

rconn

Administrator
Staff member
May 14, 2008
10,614
97
#15
Ok, I was wrong about _LOGFILE, the history file is in _HLOGFILE.

Can you not ignore me? _HLOGFILE is correctly points to %[LOCALAPPDATA]\JPSoft\TCHistoryLog. Why on Earth TCC is trying to write the history to "C:\ProgramData\JP Software\Take Command 22\TCCommandLog"?
Not reproducible here with 22.0.41; the history log and command log are both written correctly.