UNC and Xcopy

Posted on 2009-12-23
Last Modified: 2013-12-24
I've got an XCOPY command I've placed in a .bat file trying to copy files from a unc drive location to my desktop. I have a counterpart in another location that is able to run the batch file, however when I try to run the batch file, it says cannot connect to drive. Line of code in the batch file is xcopy
"\\\blah\blah\blah blah\*.*" C:\Temp\test /e /y /c /h /r /i

Can anyone suggest a reason why I cannot connect to this drive? The only two things I can think of is he has better access priveledges than I do, or there is a different firewall between each of us and this unc drive.
"\\\blah\blah\blah blah\*.*" C:\Temp\test /e /y /c /h /r /i

Open in new window

Question by:gumbudah
    LVL 3

    Expert Comment

    You should check permissions.

    If you click Start, Run, and type the UNC in and click OK, can you access the share this way? Is the location even shared?

    LVL 37

    Expert Comment

    Or possibly DNS resolution?

    Author Comment

    I've tried to access the drive via this method and it says drive is unavailable. As far as sharing goes, I'm trying to read from this location, which is used on a sharepoint site on which I have read access.... so I'd think I have read authority on this drive.
    LVL 1

    Accepted Solution

    It could possibly be a software firewall preventing access to an external network share.
    LVL 6

    Expert Comment

    If it is a sharepoint list, you should see the full path when you go to list and in Action menu choose Open in Windows Explorer.
    When you have path, you should be able to open it with start->run
    LVL 41

    Expert Comment

    UNC typically uses the NetBIOS names such as
        dir \\myserver\blah
    instead of
        dir \\\blah
    But all that academic if you can't do a DIR command to that UNC path.

    Author Closing Comment

    Turns out we had some sort of routing issue within our network that our administrators had to resolve prior to this working correctly. Thanks all for the input.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Some time ago I was asked to set up a web portal PC to put at our entrance. When customers arrive, they could see a webpage 'promoting' our company. So I tried to set up a windows 7 PC as a kiosk PC.......... I will spare you all the annoyances I…
    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now