Welcome!

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

SignUp Now!

PUSHD with UNC path in CMD.EXE

Aug
1,917
68
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
 
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!)
 
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

Back
Top