Error Move Folder Activity

Hi, I got an error for Move Folder activity.

  1. Exception Message that I received :

Move folder exception
at UiPath.Core.Activities.MoveFolderX.d__12.MoveNext()
— End of stack trace from previous location where exception was thrown —
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

  1. Current process using :

    • Use ‘For Each folder in folder’ to loop all folders to move => Set var to be : “folder”
    • Inside For Each. I use ‘Move Folder’ activity
      • From : “folder.ToString” (Include files inside)
      • To : "C:\RobotConfig"
        Remark : Folder at “From” (will be moved) has already exist in “To” by default
        Example to describe for Remark above : From “D:\Test{file1,file2,…}” move to “C:\RobotConfig\Test”
  2. Result after run the process : Files inside “D:\Test{file1,file2,…}” were moved successfully but the target folder “D:\Test” still exist and an exception was thrown

As I investigated, The Move Activity is work correctly (Try at PC1 is OK, but PC2 is error)
Anyone can fix this …

Hello @Nitiwat_Chunprapanusorn

Does that mean you are trying to move a folder that is already there in the destination?
If yes, just try to use the delete folder in the destination and then use the Move folder.


have you mark “Overwrite”