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?

3
  • which were the xcopy parameters you were using ?
    – BrOSs
    Oct 4, 2012 at 15:18
  • without parameters
    – alpav
    Oct 4, 2012 at 18:39
  • What version of Robocopy are you using? Jan 29, 2014 at 23:33

3 Answers 3

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

1
  • 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, 2012 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.

1
  • 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, 2017 at 21:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .