How do I change to a mapped network drive at the command line?

174,764

Solution 1

You need to make sure that the drive is mapped under the user which is running the command prompt. Try typing net use U: and see what info it gives you. If it's not showing the drive as being mapped, try remapping the drive (net use U: \\servername\share\path\).

You can also try changing directories by using cd /d U:, rather than just U:. This won't help you though if the network path doesn't exist.

Solution 2

CD if in the user account where drive is mapped.If you are in a Elevated Command you are no longer in the mapped user account.

Win 7: net use U: \servername\share\path\

win 8: pushd \servername\share\path\

Solution 3

In case you're using Windows 8 the pushd command will help you

pushd u:

Source: How to cd to a network drive on Windows 8?

Share:
174,764

Related videos on Youtube

Nick Hodges
Author by

Nick Hodges

I'm a Delphi developer who is now really into Angular and I'm very interested in the Software Development process.

Updated on September 17, 2022

Comments

  • Nick Hodges
    Nick Hodges over 1 year

    I have a networked drive mapped to "U:\"

    I want to go to that drive from a command line.

    However, when I try I get an error

    C:>u: The system cannot find the drive specified.

    How do I do that? Can I? Is there some Environmental setting I need to do?

  • Hack-R
    Hack-R almost 7 years
    Weirdly I am on Windows 7 but it's pushd not net use. Maybe because of some update/patch?
  • wizlog
    wizlog almost 7 years
    why was this downvoted?
  • user5359531
    user5359531 almost 5 years
    it is mapped but still not working when I use cd
  • DeshDeep Singh
    DeshDeep Singh over 4 years
    Perfect answer.! very easy to use shared drives now.