Documentation default location for LOG files

Apr 2, 2011
1,427
10
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
636
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,427
10
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,427
10
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
636
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,427
10
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,378
98
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
636
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,378
98
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
636
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,427
10
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
436
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,427
10
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,378
98
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,427
10
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,378
98
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,427
10
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
636
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
436
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,427
10
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
Thread starter Title Forum Replies Date
R How to? Set default application in a special folder Support 4
I how to make TCC default/replace cmd.exe? Support 9
R Tree on FAT32 does not sort by name by default. Support 6
M How to? How to set a default TITLE for newly opened tab? Support 2
TT's Help! Uninstalling TCC did not restore cmd.exe as Win10 default batch file processor. Support 4
R Shortcut key assignments - default Support 0
Alpengreis Installer problem with default handler Support 3
Jake Default directory Support 3
W Copy+Paste without breaking long lines as default? Support 1
vefatica Documentation Documentation of popup location and size Support 4
vefatica Windows Terminal ... Pop-up location Support 1
J Licesne file location Support 1
vefatica Documentation INI file location? Support 2
C Erase all characters left or right from cursor location Support 2
nickles Move takecommand.18.0.key location to installation directory Support 4
Steve Pitts Cursor location when switching back to TC window Support 19
S Location of tcmd.ini in x64 Support 4
R location of .ini file Support 17
S Take Command v9 download location? Support 3
Ville Changing folders location from TCC prompt? Support 7
H Configuring the location of BATCH.BCP in the INI file Support 0
vefatica v26 exception log gone crazy Support 6
Alpengreis Fixed Crash after copy dialog with big TCC.exception.log Support 5
DrusTheAxe Runaway TCC.exception.log filling drive Support 5
Joe Caverly tcc.exception.log Support 3
rps LOG /a (all) with Atl-F2 Support 2
P LOG command behavior Support 3
rps How to? Alias/Command line use of *log on/off Support 2
C b34 Installer leaves LOG in %LocalAppData%\Temp\ Support 1
vefatica Strange tcc.exception.log Support 7
C LOG entry for TCMD/TCC command line Support 15
Jay Sage WAD Issues with LOG Command Support 4
vefatica TCC.LOG Support 4
D How to? How to show variables expanded in the log tab Support 3
M How to? Start a program on log on elevated abovenormal Support 5
F Dating a log Support 14
C TPipe Log file not correct Support 1
A How to? Set up a log file for all command output Support 3
vefatica aemail\datamystic.log? Support 1
M How to? Save the session log from a batch file? Support 5
S Documentation LOG command Support 0
dcantor Documentation Help error for command LOG Support 0
S Log and foldermonitor problems Support 3
S LOG within a batch file Support 1

Similar threads