Applies to Product - Power Automate
What’s happening?
Action for copying a file in the system fails with the message "File already exists" even though the overwrite option is set to true.
Reason:
The failure occurs because the process cannot access the file as it is being used by another process. This can happen if the file is locked by an application, such as antivirus software or a custom application, which may be accessing the file at the time of the copy operation.
Resolution:
- Use the Process Monitor tool (https://learn.microsoft.com/sysinternals/downloads/procmon) to identify any other processes that might be accessing the file. This tool can help determine which application is locking the file.
- Ensure that no other application is accessing the file until the copy operation is fully completed. Other applications should wait enough time before accessing the file created by the connector.
- If antivirus software is involved, consider excluding the folder from being scanned to prevent it from locking the file during the copy operation.
- Schedule the copy process to run at a different interval to avoid conflicts with other processes that may be accessing the file.
