Environment variable in OPTION screen?

Aug 18, 2009
2
0
I would like to set the path for command history to %APPDATA%\JP Software\Take Command\CmdHistory.txt, but I get an invalid path error on the next command I type and it turns off history recording. The directory already exists, so it appears the %APPDATA% isn't being expanded.

Is there a way to do what I'm trying to do? The beauty of this is that each user has their own history.

Thanks!
 
May 20, 2008
3,515
4
Elkridge, MD, USA
imbs wrote:
| I would like to set the path for command history to *%APPDATA%\JP
| Software\Take Command\CmdHistory.txt*, but I get an invalid path
| error on the next command I type and it turns off history recording.
| The directory already exists, so it appears the *%APPDATA%* isn't
| being expanded.
|
| Is there a way to do what I'm trying to do? The beauty of this is
| that each user has their own history.

Sorry, environment variables are cannot be used in OPTION. You can achieve
the same goal several ways. The simplest, which works in all versions, is to
use the LOG command with the desired path in TCSTART.
--
Steve
 
Feb 25, 2010
5
0
imbs wrote:
| I would like to set the path for command history to *%APPDATA%\JP
| Software\Take Command\CmdHistory.txt*, but I get an invalid path
| error on the next command I type and it turns off history recording.
| The directory already exists, so it appears the *%APPDATA%* isn't
| being expanded.
|
| Is there a way to do what I'm trying to do? The beauty of this is
| that each user has their own history.

Sorry, environment variables are cannot be used in OPTION. You can achieve
the same goal several ways. The simplest, which works in all versions, is to
use the LOG command with the desired path in TCSTART.
--
Steve
I found this somewhat old post searching, as I was trying to to a similar thing. I could not get %appdata% to work either in "option" or directly in the .ini file in any syntax (quoted, %appdata%, %appdata, etc.) This answer surprises me.

I found I can map it to a drive letter first, i.e. "subst q: %appdata%. Bit of a kludge, but it works.
 
Similar threads
Thread starter Title Forum Replies Date
J Set environment variable from stdout of command Support 3
nickles Passing a variable to a command w/o adding it to the local environment Support 7
rfaquino WAD Apparently a bug when expanding environment variable %ProgramFiles(x86) Support 2
B WAD environment variable in TCC.exe Support 2
M Updating environment variable from C++ fails erratically in version 14... Support 57
Frank problem with environment variable x86 vs. x64 Support 2
D Environment variable oddity Support 12
S blanks in environment variable paths Support 4
E Environment variable in tcmd.ini Support 14
J trouble redirecting output to environment variable Support 7
Peter Murschall v27.00.16/17: ENDLOCAL with exporting variables wipes out the complete Environment Support 2
T Is there a way to maintain the position in the environment list, while debugging? Support 10
D Unnecessary environment dependencies of TCC.EXE Support 3
T Portable Take Command installation for VDI environment Support 2
D v23 environment oddity Support 3
gschizas Take Command (Environment) doesn't show v2 ANSI colors Support 30
M Save the environment .. ;-) Support 2
Charles Dye Read-only environment variables wiped by SETLOCAL / ENDLOCAL Support 5
J Shell nesting level, and inherited environment variables Support 10
vefatica Environment refresh? Support 0
SeoulBigChris Save Environment (Tabs) on Exit? Support 3
fpefpe Documentation environment variables Support 3
fpefpe How to? Environment Variables changed Support 2
vefatica OT: Rex, how does CMD handle its environment? Support 0
fpefpe volatile environment Support 5
daniel347x How to get Take Command to read in all current system environment variables that CMD.EXE sees? Support 13
D Environment in elevated process Support 1
Peter Bratton IDE environment window display Support 0
vefatica Got IDE's environment tab back Support 0
vefatica What environment variables does IDE need? Support 3
tinjaw Looking for best practice for custom environment on tabs Support 0
E Environment variables, set and input Support 2
D Parsing an array variable to an array does not work Support 5
sully9 How to? Unexpected %DATE% CMD variable format (vs DATE /T format) in CMDebug Support 1
P Inserting string into a variable. Support 3
vefatica Setting array variable ignores leading spaces (and @execarray doesn't) Support 4
Joe Caverly Set a batch variable (%1 - %n) when TCC is executing a batch file Support 5
R Difference between TCC and CMD: variable names with hyphens Support 4
Joe Caverly Get a variable type Support 2
M How to set Path variable for non-executable file extensions in 4DOS Support 8
rps For loop internal %_for_files variable? Support 2
A How to safely print variable's value without quotes? Support 9
vefatica Array name in a variable? Support 3
nikbackm TCC 20 variable expansion bug Support 6
X How to set %_INIREAD result to variable Support 5
Charles Dye _USBS variable Support 2
BeechComer Debugger: how to set %1 variable? Support 3
Mordachai Variable followed by function constantly failing... Support 5
T Variable indirection for arrays Support 1
Mike Hall Unexpected "Variable loop" in IF condition Support 10

Similar threads