Extracting the current command line, extracting current path

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?
 

samintz

Scott Mintz
May 20, 2008
1,503
16
Solon, OH, USA
You have many options: _CWD, _CWDS, _CWP, _CWPS, @CWD, and @CWDS.

-Scott

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


> 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?
>
>
>
>
 
Aug 9, 2009
229
1
set mycurrentpath=%@sfn[%_cwd]


> Subject: [Support-t-2518] Extracting the current command line,
> extracting current path
>
>
> 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?
>
>
>
>
 
Similar threads
Thread starter Title Forum Replies Date
Joe Caverly How to? Get name of current LIBRARY function? Support 4
R How to? Open Take Command at current folder Support 7
R CMDebug, dark theme, current line Support 7
R How to? Obtain current colors Support 2
K copy changing destination current directory Support 1
A Installer /extract: extracts into current directory if target not exists Support 12
scottb How to? ipconfig output in current window Support 4
vefatica TCMD's current directory? Support 4
vefatica Update to current install dir? Support 8
Allen TCC 17 Beta - current functionality? Support 5
M Hotkey-mechanism, for doing something with the current command-line Support 4
S DESKTOP - identify current active ? Support 4
Charles Dye IFTP, current directory, open new connection Support 0
A How to? Copy current directory to clipboard Support 9
R How to? Is there a way to see current directories in all drives? Support 11
M How to? A very simple question re. the current line number in a batch file... Support 2
daniel347x How to get Take Command to read in all current system environment variables that CMD.EXE sees? Support 13
J Utility to Save/Restore current screen Support 16
Dmitry L. Kobyakov How to? How to remove the record of the old version of the Take Command? Support 5
D Can alias pass parameters to for command? Support 3
samintz How to? Search for %(command) in Help? Support 1
T VIEW only works from command line Support 14
rconn News Take Command / TCC / CMDebug / TCC-RT v28 Released Support 0
T Take Command 28: Lua reports version 5.4.0 (5.4.3 expected) Support 0
Jay Sage WAD Possible Bug With OPTION Command With @FILE Support 5
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.24 uploaded Support 0
J Take command does not start on Windows 10 Support 3
vefatica `Back quotes` - command line vs. batch file Support 5
Jay Sage WAD Failure of Alias Command with /Z Option Support 14
Phileosophos Is there any way to open the Take Command options dialog from the command line? Support 8
Phileosophos Command-line Editing Shortkeys That Fail Support 6
fpefpe How to? free (internal) command Support 0
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.23 uploaded Support 0
T How to? retain command history across reboot? Support 6
rconn News Take Command / TCC / CMDebug / TCC-RT v27.01 Build 22 Uploaded Support 0
Jay Sage Bug With Flow Control and/or Command Grouping Support 2
GermanDirk How to? EVENTLOG Command with simple User Rights not functional Support 4
Jay Sage Take Command Is Too Fast! Support 4
Jay Sage Comparison of IF with Command Group and IFF Support 6
D Open Windows 10 Photos app from command line Support 11
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.21 uploaded Support 0
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.20 uploaded Support 0
U Can not get/start Take Command gui Support 1
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.19 Support 0
S Increasing Font Point Size in Command Tabs Support 2
mfarah Fixed The DATE command produces the wrong error message. Support 1
vefatica Command name mix-up Support 3
FreezerBurnt "Missing SETLOCAL" when initializing Visual Studio Command Prompt. Support 9
E How to? Closing desktop created by DESKTOP command Support 10
rconn News Take Command / TCC / CMDebug / TCC-RT v27.0.18 Support 0

Similar threads