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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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?
MASEE Solution Guide - Technical Dept HeadCommented:
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
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

MASEE Solution Guide - Technical Dept HeadCommented:
Glad to know you sorted by yourself
NVITEnd-user supportCommented:
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.