Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Environment variable in OPTION screen?

Aug
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!
 
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
 
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

Back
Top