Access to path is denied


When running a workflow i get the following error message. Part of an invoke operation.

Main ver 4.00 has thrown an exception

Source: Invoke method

Message: Access to the path 'C:\Users\xxxxxx.xxxxxx\Desktop\Samsung\Working Copies’ is denied.

Exception Type: UnauthorizedAccessException

System.UnauthorizedAccessException: Access to the path ‘C:\Users\Massimo.Gatta\Desktop\Samsung\Working Copies’ is denied.
at System.Activities.Statements.MethodExecutor.InvokeAndUnwrapExceptions(Func`3 func, Object targetInstance, Object actualParameters)
at System.Activities.Statements.MethodResolver.SyncMethodExecutor.BeginMakeMethodCall(AsyncCodeActivityContext context, Object target, AsyncCallback callback, Object state)
at System.Activities.Statements.MethodExecutor.BeginExecuteMethod(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
at System.Activities.Statements.InvokeMethod.BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
at System.Activities.AsyncCodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Make sure you can access the file or path manually on the machine and user id (of the robot) that it is being run on. That’s typically why you would get Access Denied.

Have checked that and local access is not a problem, only when the robot runs is the access denied.


Adding more detail

We are trying to unzip a file that is in a folder on the desktop. The unzip is using an invoke that has two path variables, the first indicates the file to unzip, the second the folder to put the unzipped files in. It is the second that fails with the Access denied error. The assigned VB script to the second variable is as follows, “C:\Users\Massimo.Gatta\Desktop\SS\Working Copies” .

Any help would be appreciated.

guys can i know how you fixed this issue… I am also facing same issue. I am unable to download packages

1 Like


Instead of assigning the path to a variable (Hardcoded), we used an assign task to assign the path and it worked for us.

I hardcoded the path into the workflow and I still get the same error message…any other suggestions on how to fix this issue? I have tried running as administrator and as user to which each have access to local folder, but when I run the workflow, it produces this error.

@CScruggs Did you ever find a solution to this problem? I’m getting the same error and have tried all steps listed above.

I’ve the same problem ,can anyone find a solution?


Hi Massimo,

Can you please explain this in a bit more detail, because we are at an important junction and badly stuck.Thanks:grinning:

Stuck with the same issue in windows 10, tried all mechanism mentioned above


we are facing the same issue while copying the file.
Access to destination folder is denied.
Destination folder exists, user has admin rights on the machine and manually can access the folder without problems.

Please share some idea how to resolve this issue.

Thank You


Hello all, I had this same issue and found a solution.

There is a hidden folder called .local. Delete that entire folder and then try opening the project or file. Viewing hidden files in Windows must be enabled and more on that can be found here:


Hey this one fixed it for me. So this folder has been created somewhen earlier. Deleted the whole package and redownloaded it via Robot. Now working properly.

For me, just deleting the hidden folder “.local” didn’t work.
I had to delete it and then also disable the show “Hidden” folders again AND disable the “Read-only” option too.

Has anyone found an alternative solution to this? I am facing the issue of ‘access is denied’ and tried all of the above. Thank You

I used InvokeMethod to use the System.IO.Compression.ZipFile - for unzipping and no problem.
I both used first hardcoding the paths and then assigning. All was ok.

Then when I was “cleaning up” something broke and I got Access to the path … is denied message. Which brought me here… I found out that in my case I had reversed the order of the Parameters. Originally it was like this


but when I got the Access denied it was like this


I don’t know if this is strictly relevant here but apparently this method is order sensitive but I don’t remember seeing any docs emphasizing that fact… anyways…

In my case, I was getting this error because my file was in read-only mode.Try changing the properties of the file.

Please someone had a solution? I have this problem when im trying to copy a file. I’m adm and i’ve deleted the “.local” hidden folder but did not work. Is this a Bug on UiPath??

Did you find a solution? I am facing the same problems here.