0

Network admin allowed me to read-access only 1 file from a subfolder of a shared folder on a server and I don't have permissions to even view upper level folders, but when I open that folder I can see all files in it.

I open command window under my user name on my PC and then try to copy that file on my PC:

when I use copy - it works

when I try xcopy - it says "File not found".

when I try robocopy - it says "Access is denied".

How come "copy" is the best tool from those 3 in my situation ? What can I do to make other tools to work in this case ?

  • which were the xcopy parameters you were using ? – BrOSs Oct 4 '12 at 15:18
  • without parameters – alpav Oct 4 '12 at 18:39
  • What version of Robocopy are you using? – Kevin Fegan Jan 29 '14 at 23:33
0

try this

XCOPY \\Server\Folder\yourFile.txt C:\YourReportFolder\  /C /S /D /Y /I

Example:

XCOPY "\\MX0010\Folder\YourFile.xlsx" "C:\Users\User\Desktop\Reports\" /C /S /D /Y /I

Regards

  • This did not help, if I replace xcopy from your example with copy and remove /C /S /D /Y - it works. xcopy still gives same error "File not found". Putting backslash at the end or wrapping source and destination in quotes did not make any difference. – alpav Oct 4 '12 at 20:24
0

Have you tried mapping your source folder to drive letter first and then use the drive letter in the copy script? It shouldn't matter, but I have seen stranger work-arounds.

 net use f: \\Server\Folder
 XCOPY "f:\YourFile.xlsx" "C:\Users\User\Desktop\Reports\" /C /S /D /Y /I
0

I had this same thing happening to me. I found that my user account didn't have folder permissions to a higher level folder. My guess is that xcopy navigates through the folders and when the user doesn't have access to a higher level, it throws the Invalid drive specification error. If I use copy then it must not be navigating through the upper folders and it copies fine. I'm granting "List folder contents" permission to my user account now. I'm guessing that will work to be able to continue using xcopy.

  • This answer is fairly low effort reply to the original question. Could potentially improve this by researching xcopy and whether it travels down directories/copies trees in their entirety. – Will May 31 '17 at 21:37

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.