PUSHD with UNC path in CMD.EXE

From CMD.EXE, when I use PUSHD with a UNC path, it changes to a drive letter;
Code:
c:\utils>pushd \\home-w2k\w2kutils

Z:\>

From TCC.EXE, when I use PUSHD with a UNC path, it changes to the UNC path;
Code:
c:\users\jlc\utils>pushd \\home-w2k\w2kutils

\\home-w2k\w2kutils>

From the CMD.EXE PUSHD help;
Code:
c:\utils>pushd /?
Stores the current directory for use by the POPD command, then
changes to the specified directory.

PUSHD [path | ..]

  path        Specifies the directory to make the current directory.

If Command Extensions are enabled the PUSHD command accepts
network paths in addition to the normal drive letter and path.
If a network path is specified, PUSHD will create a temporary
drive letter that points to that specified network resource and
then change the current drive and directory, using the newly
defined drive letter.  Temporary drive letters are allocated from
Z: on down, using the first unused drive letter found.

Is there a switch in TCC that I can set to get this CMD compatibility?

Joe
 

rconn

Administrator
Staff member
May 14, 2008
12,406
152
No, there's no switch in TCC to do this, for three reasons:

1) TCC / 4NT had the PUSHD command long before CMD.
2) CMD does this because it doesn't support UNCs very well (including an inability to CD to them). TCC supports UNCs everywhere.
3) I couldn't think of any reason that this would be useful.

If you would like to see this in a future version of TCC, please post it to the Suggestions Forum. (Include #3!)
 
Aug 23, 2010
647
9
CMD in fact does not support UNC paths as CWD directly. All you see is a side effect/undefined behavior that may one day change.
 
Similar threads
Thread starter Title Forum Replies Date
R pushd popd 'down' and 'next' Support 35
vefatica Win 10 to 7 VPN and UNC CWD Support 12
M A UNC name failure... Support 28
D Function to see if a UNC path is mapped? Support 9
V Set path permanently from within TCC? Support 3
Jay Sage Command Will Not Run Using Short Name of Path Support 5
MickeyF Why doesn't my python program get executed without specifying its path? Support 2
M How to set Path variable for non-executable file extensions in 4DOS Support 8
D How to? Path problems in TCC20 Support 1
vefatica "COMSPEC path" Support 2
Patulus TCHistoryLog: TCC: (Sys) The system cannot find the path specified Support 15
vefatica If there's no PATH variable ... Support 5
D V19: toolbar /r "path\tctoolbar.ini" Support 1
C ECHOing the _CWD with a & in the path Support 7
David McClelland How to? Path Changes Support 4
gschizas Fixed Cannot use extended path to delete invalid file Support 3
nickles Fixed In batch files, %0 now evaluates to the absolute path Support 9
cgunhouse IFTP Path Issue in V17 - Fixed Support 7
M How to? List path getting short file and directory names... Support 10
M How to? Get both path to and target of symbolic link/junction... Support 2
N Command completion and PATH Support 0
noahcoad How to? Create shortcut with env var in path Support 4
Exolon Space within path and FOR Support 4
A WAD Dir daterange + multiple path wildcards crashes tcc Support 2
D TCC can't start app if @shfolder[42] used for path Support 1
fpefpe How to? Path(s) for Python Support 0
D TPIPE works without being in path, but not V; aemail Support 8
Stefano Piccardi IDE.exe start toobar button fails when % in script path Support 0
H 12.10 UNZIP ignores destination path spec Support 2
Phileosophos unzip not using specified path Support 5
D Extracting the current command line, extracting current path Support 4
Stefano Piccardi char class wildcard issue when [] in path Support 14
williamleara Specifying path to TCMD.INI causes issues Support 8
hrensink Path length limit Support 9
CWBillow Adding to the path Support 6
D D:\Settings\Application contains an incorrect path? Support 0
M TCC cannot find the path specified Support 4
P Too much path in path Support 12

Similar threads