Accessing uNC paths from CMD line/bat file

GST-GRIDTECH used Ask the Experts™
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
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
CESNetwork Administrator

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 Head
Most Valuable Expert 2017

As commented above it should work.
Please post the screenshot of the error.
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
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

MASEE Solution Guide - Technical Dept Head
Most Valuable Expert 2017

Glad to know you sorted by yourself
NVITEnd-user support

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


After a little more troubleshooting and research I was able to find the solution

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial