Environment variable in OPTION screen?

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Aug 18, 2009
2
0
#1
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!
 
#2
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
#3
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.