How to deal with “CMD does not support UNC paths as current directories“

The solution is to use pushd instead of cd to change the current directory to a share accessed via a UNC path (e.g.: >pushd \\myserver\myshare).
Use popd when done.

More info on the Microsoft Web site.

54 responses to “How to deal with “CMD does not support UNC paths as current directories“

  1. Thanks you! Simplest answer to my question! That is all I needed.

  2. Thanks so much. That worked beautifully! It replaced some the first part with Q:. I wonder if I had that assigned already if if it found the first available and mapped it.
    No need to tell me, i will research it.


  3. excellent answer

  4. Thanks!
    But now I get:
    “A device attached to the system is not functioning.” It works in explorer… hmm…

  5. Nice! Glad to see that someone knows what they are doing. Give yourself a gold star and a pat on the back.



  6. Awesome!!! I was searching for this from so many days

  7. great, thanks a lot!!

  8. THanks for the quick fix to my problem!

  9. Wonderful, just wonderful! I was struggling for about an hour to accomplish the same thing but using the ‘cd’ command instead. But you made things much easier.

  10. Thanks. Exactly what I needed & was the 1st thing that popped up off google.

  11. well done..perfect answer

  12. Cool…solved my issue. Thanks!

  13. Thanks, That resolved my issue

  14. Thanks Alot ๐Ÿ™‚

  15. You can also use commandline :

    Explorer \\servername\foldername\foldername
    this won’t map the drive though..


  16. I love it… I’ve always seen pushd/popd but never saw the benefit of it… this is an excellent use case!

  17. Brilliant! Many Thanks

  18. Weee…settled my issue within few mins!! ๐Ÿ˜€ thanks mate ๐Ÿ˜‰

  19. thank you.. really good answer… i was been searching for this from so many days..

  20. Thank you! Exactly what I was looking for. My setup was I am using VMWare to use Windows 7 on my Mac and was looking for a way to change directories into my Mac’s home directory, which VMware made available to me as an alias on my Desktop… and which browses fine in Windows Explorer, but couldn’t be “cd’ed to” in cmd.exe.

  21. That worked like a charm!!! Thanks!

  22. Great solution to solve my long – lasted problem to send a Fortran job with many Call System to a HPC system – Thanks!

  23. Thanks a ton !!! was desperate for a solution !!!

  24. !!!!!!!!!!! HOORAY !!!!!!!!!!!!!!! THANKS!!!!!

  25. Fantastic, this has bothered me for a long time.

  26. You just saved my life! Thanks!

  27. Superbe ! Ca vient de me rendre un trรจรจรจs grand service !
    Beautifull ! It’s just help me such a great way !

    MS-DOS: still loving you :o)

  28. Marcus Bornestav

    You can use cd \\serverpath in powershell though.

  29. neat! it works like a charm!

  30. This was most helpful. Thank you.

  31. Works great, cheers.

  32. Works wonderfully , great command !!

  33. thanks so much. most helpful

  34. Pingback: Handling “path too long” on Windows | An Arrogant Nice Guy

  35. Hi there! Do you know if they make any plugins to protect against hackers?
    I’m kinda paranoid about losing everything I’ve worked hard on.
    Any suggestions?

  36. Every weekend i used to pay a visit this web page, as i want enjoyment, since this this site conations in fact
    fastidious funny information too.

  37. brilliant, thank you!

  38. Hi everyone, it’s my first pay a visit at this web site, and piece of writing is genuinely fruitful in favor of me, keep up posting such posts.

  39. Thanks alot ๐Ÿ™‚ I could change the directory using ‘pushd’

  40. You can also use Long Path Tool it works good.

  41. heh… have to jump on the bandwaggon too… great information, never been aware this was possible using PUSHD and POPD! saves me a lot of batch variable fiddling!!! *highfives* ๐Ÿ˜‰

  42. Please let me know if you’re looking for a author for your blog.
    You have some really good articles and I believe I would be a good
    asset. If you ever want to take some of the load off, I’d
    love to write some material for your blog in exchange for a link back
    to mine. Please send me an e-mail if interested.

  43. In fact no matter if someone doesn’t understand then its up to other
    people that they will help, so here it happens.

  44. I found just what I was needed, and it was enerttaining!

  45. Thank you this really helped

  46. I am using a software called Long Path Tool and it is working like charm, i have no problems in copying or extracting anything anywhere.

  47. doesnt work for me, access denied appears

  48. Hi there friends, how is all, and what you desire to say concerning
    this piece of writing, in my view its truly awesome designed for me.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s