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

Extracting the current command line, extracting current path

Discussion in 'Support' started by derickmoore, Jan 5, 2011.

  1. derickmoore

    Joined:
    Nov 9, 2010
    Messages:
    2
    Likes Received:
    0
    I'm sure there must be some easy way to extract my current path!

    But, I started at the beginning of the help index and went to the end without any recognizable entry I could use.

    I merely want to extract the current path so I can use it in a batch file.

    as:

    set mycurrentpath=PullPath
    subst z: %mycurrentpath%

    or something like that!

    Can someone point me to the command that will extract the current path?
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,732
    Likes Received:
    81
    If by "current path" you mean your current working directory, then take a look at the internal variables %_cwd, %_cwds, %_cwp, and %_cwps.
     
  3. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,178
    Likes Received:
    11
    You have many options: _CWD, _CWDS, _CWP, _CWPS, @CWD, and @CWDS.

    -Scott

    derickmoore <> wrote on 01/05/2011 02:50:29 PM:


    file.

     
  4. derickmoore

    Joined:
    Nov 9, 2010
    Messages:
    2
    Likes Received:
    0
    That was exactly what I needed! Thank you!
     
  5. Kachupp

    Joined:
    Aug 9, 2009
    Messages:
    133
    Likes Received:
    0
    set mycurrentpath=%@sfn[%_cwd]


     

Share This Page