Welcome!

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

SignUp Now!

Documentation default location for LOG files

Apr
1,793
15
The help for LOG tells the default names for the files - but not the location.

I use windows 7, so if I wanted to put them under %UserProfile%\AppData\ - would it go under Local or Roaming ?
Same question, but for windows 10+ ?

TCC 22.00.41 x64 Windows 7 [Version 6.1.7601]
TCC Build 41 Windows 7 Build 7601 Service Pack 1
 
It would go where you would send it.
Don't use %UserProfile%, use %AppData% or %LocalAppData%, up to your needs.
 
The default location is "C:\ProgramData\JP Software\".

Would be worth mentioning in the CHM and the online help pages..

Added:
%ProgramData%\JP Software\TCCommandLog or TCErrorLog or TCHistoryLog (not mentioned, @rconn ).....
 
Last edited:
I'm trying to be strict to windows rules. What is the difference between "%appdata%\JP Software" and "%localAppData%\JPSoft" ?
 
These are different locations.
%AppData% is usually %UserProfile%\AppData\Roaming, while %LocalAppData% is %UserProfile%\AppData\Local.
The former is roamed between different systems and included in profile backup, the latter contains TC/TCC settings, but is considered machine-specific data, is NOT roamed and NOT included in profile backups.

Short version is, the location of the settings file is wrong. "%localAppData%\JPSoft" would suit more for logs.
 
These are different locations.
%AppData% is usually %UserProfile%\AppData\Roaming, while %LocalAppData% is %UserProfile%\AppData\Local.
The former is roamed between different systems and included in profile backup, the latter contains TC/TCC settings, but is considered machine-specific data, is NOT roamed and NOT included in profile backups.

Short version is, the location of the settings file is wrong. "%localAppData%\JPSoft" would suit more for logs.
So where should tcmd.ini and log files go?

TCMD.INI : ??
Log files : %LocalAppData%\JpSoft
 
Regarding the INI file, see below. It mentions "the table below" which I couldn't find. If you put it in the directory where the EXE resides, it's found. %LOCALAPPDATA doesn't seem appropriate. %LOCALAPPDATA\JPSoft seems more appropriate and if you put it there, it's found.

TCC Initialization (.INI) Files
Locating the TCMD.INI File

1) When starting TCC (a "primary shell"):

Onestep
If there is an @d:\path\inifile option on the startup command line, TCC will use the path and file name specified there.

Onestep
Otherwise, the default .INI file name in the table below is used, and the search starts in the directory where the TCC program file is stored. If the .INI file is not found, TCC will look in the %LOCALAPPDATA% directory.

If no .INI file is found, all options are set to their default values. A new .INI file will be created, using the default location and name, as explained above.

2) When starting TCC (a "secondary" shell) from another TCC shell:

TCC retrieves the primary shell's .INI file data, processes the [Secondary] section of the original .INI file if necessary, and then processes any @d:\path\inifile option on the secondary shell command line.
 
"Appropriate" in this case means "suitable or proper in the circumstances."
%LocalAppData%\JPSoft is appropriate for TC/TCC to find its initialization files, but from Windows usability standpoint it is not appropriate to store them there. Most of the .ini file contents are user specific settings, not machine specific.
 
%LOCALAPPDATA **is** user-specific. It's tolally appropriate and it's a must if more than one user will use the software.
 
%LocalAppData% is per-user, yes, but it's considered machine specific, thus not roamed.
Code:
# ls -ld /srv/Profiles/anrdaemon/WinProfile.V2/AppData/*
drwxrwx---+ 1 anrdaemon domain users 446 сен 19  2019 /srv/Profiles/anrdaemon/WinProfile.V2/AppData/Roaming
 
So basically for a non-networked user the approbiate location of the:

TCMD / TCC LOG files is: ??
TCMD.INI : ??

maybe a spreadsheet would be good?
 
Interesting discussion. I haven't left the location of my log file up to a default in years.

I create a LOG directory in each of my TCMD(version) directories and set that as the logging directory during my TCMD/TCC startups.
Code:
  *log /w /h %Logfile & *log /w /e %Logfile & *log /w %logfile
The %Logfile is defined earlier and includes a complete path to the appropriate TCMD/LOG directory and a unique filename which includes the current date.

Not exactly on the subject of default location, but perhaps some will benefit from an alternative.
 
@rps - is %Logfile defined by TCC/TCMD or by the user? What is the form of what it's set to ? You mentioned it has the current date .... i assume some form of YYYYMMDD and then HHMMSSd ?
 
Apparently rps's %logfile was set by the user. If you're talking about the command log and the history log, you specify their locations, and turn them on/off, here. Put them anywhere you want as long as you have read/write access. TCC sets _LOGFILE and _HLOGFILE to whatever you specify.

1624123445082.png
 
I am familiar with the Options dialog and setting the location of the LOG files. Just was curious why the default was the root of %SYSTEMDRIVE%
 
Hmmm! I can only go back to v24. If I leave "History" checked and delete the file name, TCC replaces the file name with this (and uses it).

Code:
C:\ProgramData\JP Software\Take Command 24\TCHistoryLog
 
Because that was the default in 4DOS?

I think I've used JP products since that far back. Not 100% sure though.

Hmmm! I can only go back to v24. If I leave "History" checked and delete the file name, TCC replaces the file name with this (and uses it).

Code:
C:\ProgramData\JP Software\Take Command 24\TCHistoryLog

wonder why it's programdata and not %appdata% or %LocalAppData% - anyone hazzard a guess?
 
So basically for a non-networked user the approbiate location of the:

TCMD / TCC LOG files is: ??
TCMD.INI : ??

maybe a spreadsheet would be good?

For log files, I suggest %LocalAppData%\Logs. The default location is insecure.
For TCMD.INI, the "appropriate location" is where TCC/TCMD is looking for it, thus %LocalAppData%\JPSoft.
 
@rps - is %Logfile defined by TCC/TCMD or by the user? What is the form of what it's set to ? You mentioned it has the current date .... i assume some form of YYYYMMDD and then HHMMSSd ?
As Vince said the "%_Logfile" and "%_HLogfile" are defined by the user.
I use the following in my tcmd.ini file.
Code:
: HistLogName="%@path[%_cmdspec%]logs\TC%@formatn[02.0,%_day]_%_imonth%_%_year.log"
LogName="%@path[%_cmdspec%]logs\TC%@formatn[02.0,%_day]_%_imonth%_%_year.log"
LogErrorsName="%@path[%_cmdspec%]logs\TC%@formatn[02.0,%_day]_%_imonth%_%_year.log"
I also define a variable named "logfile" and "fldate" in a master variable list that is read during tcstart.btm execution. Clearly if your TCMD/TCC are up during a date change you will need to manually update the log file names, which I do with an alias.
Code:
: Used to name the session's log file.
fldate=%@formatn[02.0,%_day]_%_imonth%_%_year
LogFile="%@truename[%@path[%_cmdspec]logs\TC%fldate.log]"
Note: The names (with variables) used in the tcmd.ini file can sometimes be overwritten with the actual expanded current log names. ie. HistLogName="%@path[%_cmdspec%]logs\TC%@formatn[02.0,%_day]_%_imonth%_%_year.log" becomes c:\jpsoft\tcmd27\logs\TC25_Jun_2021.log in the actual tcmd.ini file. So that is something to look out for if you decide to use this method of defining your log filenames and their locations.
 
As Vince said the "%_Logfile" and "%_HLogfile" are defined by the user.
I use the following in my tcmd.ini file.
Code:
: HistLogName="%@path[%_cmdspec%]logs\TC%@formatn[02.0,%_day]_%_imonth%_%_year.log"
LogName="%@path[%_cmdspec%]logs\TC%@formatn[02.0,%_day]_%_imonth%_%_year.log"
LogErrorsName="%@path[%_cmdspec%]logs\TC%@formatn[02.0,%_day]_%_imonth%_%_year.log"
[snip]
Note: The names (with variables) used in the tcmd.ini file can sometimes be overwritten with the actual expanded current log names. ie. HistLogName="%@path[%_cmdspec%]logs\TC%@formatn[02.0,%_day]_%_imonth%_%_year.log" becomes c:\jpsoft\tcmd27\logs\TC25_Jun_2021.log in the actual tcmd.ini file. So that is something to look out for if you decide to use this method of defining your log filenames and their locations.

Didn't realize that Logname and LogErrorsName could be set to the same file. I guess the same is true for the other log file too. Namely the Command, Errors, and History log files.
 

Similar threads

Back
Top