I was using a batch file to access some files from network.
I am using
pushd \\Network\path
to navigate to the networked directory to initiate some scripts
My bat file was working perfectly fine till this morning I saw "cmd returning CMD does not support UNC paths as current directories".
I have seen this error message when using cd instead of pushd to navigate to a network directory but I can figure out why I am getting error for a previously working bat file.
And I did make sure that network location was online and accessible other way round.
From
pushd /?
:Do any mapped drives show up in
net use
afterpushd
is executed?If you're not getting some kind of network authorization error, make sure command extensions are enabled (I'm not sure why they wouldn't be.)
cmd /x
will enable extensions for the current CMD session. Try that prior to executing your batch script.The "main switch" is in
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
.EnableExtensions
should be(DWORD) 1
Be sure to also check that you haven't just run out of drive letters. If you have a rogue script that isn't using popd after it's done with the drive, or is crashing before it gets to popd, you can end up with a bunch of garbage mapped drive. Easy to check as they'll show up in
net use
and "My Computer". For some reason cmd will give this cryptic error (CMD does not support UNC paths as current directories.
) instead of telling you it ran out of drives to map to.