saving cmd and dir history - 12.00.27

ron

Aug 19, 2008
151
0
Installed the beta.

changed the config by providing files cmdhist.txt & dirhist.txt

Started changing dirs to test 'save directory on entry' been wanting that for years!

exit

start tcmd

ctrl Pg-up = beep. No history.

Pg-up = beep, no history.

The problem. Without specifying an absolute path, the files are stored under c:\program files. No good on Vista or higher unless you run as admin.

How about defaulting to:

"c:\Users\<username>\AppData\Local\JPSoft"

That's where the .ini file defaults to.
</username>
 

rconn

Administrator
Staff member
May 14, 2008
12,345
150
Installed the beta.

changed the config by providing files cmdhist.txt & dirhist.txt

exit
start tcmd

ctrl Pg-up = beep. No history.

Pg-up = beep, no history.

The problem. Without specifying an absolute path, the files are stored under c:\program files. No good on Vista or higher unless you run as admin.

How about defaulting to:

"c:\Users\<USERNAME>\AppData\Local\JPSoft"

That's where the .ini file defaults to.
</USERNAME>

WAD. (These are not new options; they're in v11, so changing it in v12 will potentially break a lot of existing configurations.)

If you don't specify a path (always a bad idea!), the files are stored in the current directory (when saved) and retrieved from the startup directory (when read). Forcing them to the appdata directory would break configurations where people install to someplace other than "c:\program files" (quite a lot of users).
 

ron

Aug 19, 2008
151
0
I agree. As it stands now though, the default behavior (for a new/novice user) is to not work - in the example I gave. If I look closely, I can see (on exit) TC trying to do the save and the 'access denied' messages. Most users would not even know to look for that and just wonder why it doesn't work.

Displaying the path somewhere in the dialog would probably be more work than it's worth. Perhaps stressing in the help that an absolute path should always be used might help.

"History File : Load the specified history list file before running TCSTART, and save the command history to the file after running TCEXIT." Note: It's best to supply a full path\file specification here to ensure that the file is being saved to a location that TC has write access to.
 
Similar threads
Thread starter Title Forum Replies Date
Exolon V17 beta, debugger: STRG-S is inserting character instead of saving Support 12
CWBillow Saving TCMD and TCC Settings Support 3
J Saving aliases Support 21
E Saving out Command Input window Support 4
S TCC Command Line Keys - not saving to history? Support 1
C Saving State Support 1
Joe Caverly Saving SMTP Changes in TCC13 Support 5
J Backing up and daylight saving time Support 9
J Tcmd/64 issue - options not saving Support 15
B Saving scripts Support 3
T WAD CMD incompatibility Support 14
sully9 How to? Unexpected %DATE% CMD variable format (vs DATE /T format) in CMDebug Support 1
L FTYPE in TCC, less quirky than in cmd.exe Support 3
Peter Murschall Single-line Do-CMD is a bit uncooperative. Support 6
FreezerBurnt Help making a CMD and TCC compatible batch file Support 7
T Date format date different from cmd Support 7
D Differences between TCC and CMD with COPY /b Support 4
M Oracle batch OPatch.bat.bat not working in TCC but correctly in CMD Support 5
E TCC/CMD difference Support 5
S How to? Deinstalling TC/reinstating execution of bat files by cmd in Win7 Support 31
D How to? Pass OpenHere Folder to CMD? Support 6
R Difference between TCC and CMD: variable names with hyphens Support 4
M WAD "Pictures" directory is empty in TCC but not in CMD or Explorer Support 4
rps Cmd history recall Support 4
rps Documentation TITLE cmd docs Support 0
Joe Caverly PUSHD with UNC path in CMD.EXE Support 2
W Starting program for word to pdf conversion (difference cmd and tcc) Support 13
Joe Caverly Using this CMD technique from TCC Support 17
W If command - different with CMD Support 6
I how to make TCC default/replace cmd.exe? Support 9
R FOR usage error from TCC but not from CMD Support 16
I findstr works in cmd but not in tcc Support 5
D Pasting Unicode data has different behavior on TCC and CMD Support 2
M Command line parsing differences between cmd.exe and TCC Support 6
Joe Caverly Works with CMD.EXE, no output with TCC.EXE Support 7
Joe Caverly tcommand(cmd) Support 13
L WAD ECHO. expansion of non-existent env-vars differs from CMD.exe Support 6
Joe Caverly "Functions" in cmd.exe batch files Support 6
Joe Caverly Works in debugger, not from cmd line Support 1
K CMD, TCC, VisualStudio 2017, VcVars* differences Support 1
D Does TCC improve CMD's implementation of ECHO? Support 6
P Labels in batch files: TCC vs CMD.exe Support 9
Patulus Yet another thread on CMD compatibility Support 16
A Fixed (CMD compat) START /D fails to recognize the switch option. Support 3
Joe Caverly CMD.EXE and filename(1).ext Support 3
H DOS CMD Sort+Add Sequence+Remove Sequence number Support 12
T WAD Difference between TCC and CMD in handling multi-command lines Support 6
C Nested IF syntax — TCC behaving differently to CMD Support 12
T CMD incompatibility Support 14
V Network share slowness vs CMD? Support 19

Similar threads