March 15, 2012 - Warren Held

How To Use Network Paths / Connect To A Network Share With Windows Command Prompt

This is a neat little tidbit of information I learned today that is pretty useful.  If you try to change directory to a network share with the command prompt you get the error “CMD does not support UNC paths as current directories.”  To get around this you could use the command:

net use X: \\path\to\share

To mount the drive and then cd X: to navigate to the directory.  Then to remove the mounted network drive you use:

net use X: /d

Or you could use this nifty command:

pushd \\path\to\share

This will create a temporary mapped drive and make it your current working directory all in one step.  To remove it you just run:


This will remove the temporary mapped drive and change you back to your previous working directory.

Windows Windows CMD /