1

I have a UNC path to a file which I’d like to copy of the form:

\\server\folder1\folder2\filename.ext

I have read access to this file, e.g. I can paste the path into the run dialog in Windows and the file opens in the appropriate viewer. But I do NOT have read access to the containing folder, i.e. if I run just the path portion:

\\server\folder1\folder2

I get a network access error. How can I copy the file?

Robocopy, copy, and Xcopy all fail, apparently because they try to read the folder before reading the file itself.

  • how about cygwin's cp? syntax like cp /cygdrive/c/folder/file /cygdrive/c/folder/file2 Replace c with mapped network drive as you require. Check you can 'ls' it first. ls is like dir. – barlop Nov 26 '15 at 3:11
  • Holy cow, that worked! I was really not expecting that to work! @barlop, can you post this as an answer so I can mark it as correct and give you all the much-deserved karma? – rfeague Nov 27 '15 at 20:34
1

how about cygwin's cp? syntax like cp /cygdrive/c/folder/file /cygdrive/c/folder/file2 Replace c with mapped network drive as you require. Check you can ls it first. ls is like dir.

  • Remarkably, this worked like a charm! Didn't see that one coming... thanks! – rfeague Nov 30 '15 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.