Accessing uNC paths from CMD line/bat file

I'm might be missing something here.
However, we use a batch file that easily does a
Xcopy "\\serverName\path1\path2\*" "C:\programs\pathlocal1\pathlocal2" /s /e /y

On widows 7
But doesn't work on
Windows 10.

Am I missing some basic understanding here.

I guess I could just map it but wanted to understand why it works in windows7 but doesn't work in windows10

Thank you
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CESNetwork AdministratorCommented:
Not sure if it matters but, are you using capital letters for the switches?

what's the error you get?
MAS (MVE)EE Solution GuideCommented:
As commented above it should work.
Please post the screenshot of the error.
GST-GRIDTECHAuthor Commented:
I was just able to figure it out after I mapped a drive to the path but was unable to get to the drive letter via the CMD prompt.

Turns out I needed to create
EnableLinkedConnection DWORD
With a value of 1 in

Works perfect

Thank you for replying

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

MAS (MVE)EE Solution GuideCommented:
Glad to know you sorted by yourself
FWIW, you can also use PUSHD and POPD, which maps the drive letter to the path and makes it current. Then, POPD releases the mapped drive.

pushd "\\serverName\path1\path2"
Xcopy . "C:\programs\pathlocal1\pathlocal2" /s /e /y

Open in new window

GST-GRIDTECHAuthor Commented:
After a little more troubleshooting and research I was able to find the solution
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 10

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.