I have an issue witha workflow working this way:
-Getting excel files from a folder and send them in attachment using send outlook activity (but I tried also with pdf, the problem remains the same)
-Moving these files in a new “processed” folder which would contain all files sent by mail
When I run the worflow, I get the following error:
ProcessDS has thrown an exception
Source: Move file
Message: The process cannot access the file because it is being used by another process.
Exception Type: IOException
System.IO.IOException: The process cannot access the file because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at UiPath.Core.Activities.MoveFile.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.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)
If I run just the mail part, or the move file part, everything works fine. Between the two, I tried to kill processes related to excel or outlook but it doesn’t change anything. I also checked that the files were not open in any other computer/reopening them every time and using close workbook activity in the for each loop.
Any ideas ?
Main.xaml (24.3 KB)