1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Environment variable in OPTION screen?

Discussion in 'Support' started by imbs, Aug 19, 2009.

  1. imbs

    Joined:
    Aug 18, 2009
    Messages:
    2
    Likes Received:
    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!
     
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    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
     
  3. liguorid

    Joined:
    Feb 25, 2010
    Messages:
    5
    Likes Received:
    0
    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.
     

Share This Page