Move File: The process cannot access the file because it is being used by another process. i using load image then using ocr then i want to move that file to another folder. i allready using method system gc, collect and dispose but still run on error.
please check may be the file is open…try to use a kill process on that program/process and then move
cheers
use kill process activity before reading the file

the file you are trying to open is opened so only you are getting this error.
How i know the process name? i am using image and ocr
i already close all app
Hi,
Identify the Running Process:
- Open the Task Manager on your system. You can do this by right-clicking on the taskbar and selecting “Task Manager.”
- In the Task Manager, find the process associated with the application that might be using the file. Look for processes like “EXCEL.exe,” “notepad.exe,” or similar. Note down the process name without the file extension (e.g., “EXCEL” or “notepad”).
Use the “Kill Process” Activity:
- In your automation workflow, add the “Kill Process” activity before the “Move File” activity.
- In the properties of the “Kill Process” activity, look for the “ProcessName” property.
- Enter the process name you identified in the Task Manager (e.g., “EXCEL” or “notepad”) into the “ProcessName” property.
Example:
- If Excel is running and using the file, the “ProcessName” would be “EXCEL.”
- If Notepad is running and using the file, the “ProcessName” would be “notepad.”
i am using ocr and load image activity, how
?
i am not using excel and notepad or any application in my window
Hi,
please check below post
File being used by another process (no process to kill) - Help - UiPath Community Forum
I already using that method bu still error
Delay before Move File activity
use the Delay activity before the Move File activity. This gives some time for the OCR activity or any other processes to release the file before attempting to move it.
2.Use Retry Scope
Wrap your Move File activity in a Retry Scope. Configure the Retry Scope to retry a few times with a short delay between retries. This can help if there’s a temporary lock on the file.
still error, maybe it is locked by either ocr activity or load image activity
oh it is locked by ocr activity, if i delete the ocr activity i can move the file but if the ocr activity still exist, i cant move that file
image locked by load image can be release by using method dispose but i don’t know how to release image locked by ocr
it already solved by split the program, i make new program to move file in different project. But the problem still occur when the move file is in the same project with the ocr activity
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.