Robocopy: ERROR 5 (0x00000005) Accessing Source Directory \\server\ParentFolder\ChildFolder\ Access is denied

0

I have the following robocopy command to copy the directory from a folder on the network location to another folder on the same network location:

@ECHO OFF
for /f %%a in ('wmic os get LocalDateTime ^| findstr ^[0-9]') do (set ts=%%a)
robocopy \\server\SharedFolder\ParentFolder\ChildFolder1 \\server\SharedFolder\ParentFolder\ChildFolder2 /log+:C:\Yash\log\log_%ts:~0,8%_%ts:~8,4%.log /e /xo /w:10 /r:2 /z /NP /TEE

I am calling this batch file from my ASP.Net MVC application. In debug mode everything is executing fine but when I deployed my application, it generates following log for robocopy:

ERROR 5 (0x00000005) Accessing Source Directory \server\SharedFolder\ParentFolder\ChildFolder1\ Access is denied.

May I know what permissions I need to set or any other way in which I can get this working. I simply want to copy folders, subfolders and files from one folder to another on the same network location.

Note: I have mapped \\server\SharedFolder on my machine

permissions
batch
robocopy
asp.net
mvc
asked on Super User Jul 25, 2016 by Yash Saraiya

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0