Documentation default location for LOG files

Apr 2, 2011
1,549
13
54
North Carolina, USA
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
 
Aug 23, 2010
678
9
It would go where you would send it.
Don't use %UserProfile%, use %AppData% or %LocalAppData%, up to your needs.
 
Apr 2, 2011
1,549
13
54
North Carolina, USA
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:
Apr 2, 2011
1,549
13
54
North Carolina, USA
I'm trying to be strict to windows rules. What is the difference between "%appdata%\JP Software" and "%localAppData%\JPSoft" ?
 
Aug 23, 2010
678
9
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.
 
Apr 2, 2011
1,549
13
54
North Carolina, USA
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
 
May 20, 2008
11,840
120
Syracuse, NY, USA
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.
 
Aug 23, 2010
678
9
"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.
 
May 20, 2008
11,840
120
Syracuse, NY, USA
%LOCALAPPDATA **is** user-specific. It's tolally appropriate and it's a must if more than one user will use the software.
 
Aug 23, 2010
678
9
%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
 
Apr 2, 2011
1,549
13
54
North Carolina, USA
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?
 

rps

Jul 6, 2008
437
6
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.
 
Apr 2, 2011
1,549
13
54
North Carolina, USA
@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 ?
 
May 20, 2008
11,840
120
Syracuse, NY, USA
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
 
Apr 2, 2011
1,549
13
54
North Carolina, USA
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%
 
May 20, 2008
11,840
120
Syracuse, NY, USA
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
 
Apr 2, 2011
1,549
13
54
North Carolina, USA
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?
 
Aug 23, 2010
678
9
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

Jul 6, 2008
437
6
@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.
 
  • Like
Reactions: Charles G
Apr 2, 2011
1,549
13
54
North Carolina, USA
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