CMD does not support UNC paths as current directories #

Use pushd instead of cd:
C:\>cd \\server\share
'\\server\share'
CMD does not support UNC paths as current directories.

C:\>pushd \\server\share

Z:\>dir
Volume in drive Z has no label.
Volume Serial Number is XXXX-XXXX

Directory of Z:\

01/18/2012  05:04 PM    <DIR>          .
01/18/2012  05:04 PM    <DIR>          ..
01/18/2012  04:54 PM                 4 test.txt
              1 File(s)              4 bytes
              2 Dir(s)  978,217,558,016 bytes free

Z:\>popd

C:\>
More from Microsoft:
If you specify a network path, the pushd command temporarily assigns the first unused drive letter (starting with Z:) to the specified network resource. The command then changes the current drive and directory to the specified directory on the newly assigned drive. If you use the popd command with command extensions enabled, the popd command removes the drive-letter assignation created by pushd.

/windows | Jan 19, 2012


Subscribe or visit the archives.