• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 852
  • Last Modified:

UNC and Xcopy

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
"\\myserver.mycompany.mycompanyagain.com\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.
"\\myserver.mycompany.mycompanyagain.com\blah\blah\blah blah\*.*" C:\Temp\test /e /y /c /h /r /i

Open in new window

1 Solution
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?

Neil RussellTechnical Development LeadCommented:
Or possibly DNS resolution?
gumbudahAuthor Commented:
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.
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

It could possibly be a software firewall preventing access to an external network share.
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
UNC typically uses the NetBIOS names such as
    dir \\myserver\blah
instead of
    dir \\myserver.mydomain.com\blah
But all that academic if you can't do a DIR command to that UNC path.
gumbudahAuthor Commented:
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

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now