Unable to move file – Flow could not move or copy a file to a different location.

Loading

Power Automate allows users to move and copy files between different locations such as SharePoint, OneDrive, Dataverse, and third-party storage services. However, a common issue users face is the “Unable to Move File” error, which occurs when a flow cannot move or copy a file successfully.

Error Message Example:
“The file could not be moved to the specified location. Please check permissions and file path.”

This guide explains:
Why the error occurs
How to diagnose the issue
How to fix and prevent file movement failures


Step 1: Understanding Common Causes of the “Unable to Move File” Error

CauseDescription
Insufficient PermissionsThe user or flow does not have the necessary permissions to move the file.
File is Locked or In UseThe file is being used by another user or application, preventing the move operation.
Invalid File PathThe destination folder path is incorrect or does not exist.
File with Same Name Already ExistsA file with the same name exists in the destination folder, and overwriting is not allowed.
File Name Contains Restricted CharactersSome services, like SharePoint, do not allow certain characters in file names.
File Size Exceeds LimitsThe file is too large for the destination location.
Storage Quota ExceededThe destination storage is full, preventing the move operation.
Multiple Flows Accessing the FileTwo or more flows are trying to move or modify the file at the same time.

Step 2: Diagnosing the Issue

2.1. Check the Flow Run History

  1. Open Power Automate (https://make.powerautomate.com).
  2. Click on My Flows → Select the affected flow.
  3. Go to Run History → Open a failed run.
  4. Look for an error message related to file movement.
  5. Expand the action details to check:
    • The source and destination file paths.
    • Any permission errors.
    • If the file is locked or in use.

Step 3: Fixing the “Unable to Move File” Error

3.1. Ensure Proper Permissions

Problem: The flow or user does not have permission to move the file.

Solution:

  • For SharePoint:
    1. Open the SharePoint Document Library.
    2. Click on “Settings” (⚙️) → “Library Settings”.
    3. Go to Permissions for this document library.
    4. Ensure that the flow’s owner has Edit, Delete, and Move permissions.
  • For OneDrive:
    1. Go to OneDrive → Right-click the file → Click Manage Access.
    2. Ensure that the user or service account running the flow has access.
  • For Third-Party Services:
    • Check API or integration permissions in Google Drive, Dropbox, or other storage services.

3.2. Close Open Files to Prevent Locks

Problem: The file is open in an application or used by another process.

Solution:

  1. Ask users to close the file before running the flow.
  2. If the file is open in Excel Online or Word Online, close the browser tab.
  3. Use “Delay” in Power Automate before moving the file:
    • Add a “Delay” action → Set to 30 seconds before moving the file.

3.3. Verify the Destination Folder Path

Problem: The destination folder does not exist or the path is incorrect.

Solution:

  • Check the path manually:
    1. Open the destination folder in SharePoint or OneDrive.
    2. Ensure the folder exists and matches the Power Automate destination path.
  • Correct the folder path in Power Automate:
    1. Open the flow editor.
    2. Locate the “Move File” action.
    3. Ensure the Destination Folder Path is correctly entered.

3.4. Handle Duplicate File Names

Problem: A file with the same name already exists in the destination, and overwriting is not allowed.

Solution:

  1. Enable file overwriting in Power Automate:
    • Open the “Move File” action.
    • Set “If file exists” to “Replace”.
  2. Rename the file before moving:
    • Add a “Compose” action with: concat('Copy_', utcNow(), '.pdf')
    • Use the “Rename File” action before moving it.

3.5. Remove Restricted Characters from File Names

Problem: The file name contains invalid characters (\ / : * ? " < > |).

Solution:

  • Use “Replace” in Power Automate:
    1. Add a “Compose” action.
    2. Use the following expression: replace(replace(replace(triggerOutputs()?['body/Name'], '?', ''), '*', ''), '|', '')
    3. Use the cleaned file name in the “Move File” action.

3.6. Check File Size Limits

Problem: The file is too large to move.

Solution:

  • For SharePoint: The max file size is 250 GB.
  • For OneDrive: The max file size is 250 GB.
  • For Email Attachments: Power Automate limits files to 150 MB.

Fix:

  • Compress large files before moving them.
  • Use chunked uploads for large files in Power Automate.

3.7. Ensure Enough Storage Space in the Destination

Problem: The storage quota is exceeded in SharePoint, OneDrive, or another service.

Solution:

  1. Check available space in OneDrive or SharePoint.
  2. Delete old or unnecessary files to free up space.

3.8. Prevent Multiple Flows from Moving the Same File

Problem: Multiple flows are trying to move the same file at the same time.

Solution:

  1. Open the flow → Click the trigger action (e.g., “When a file is created in SharePoint”).
  2. Click “Settings” → Enable “Concurrency Control”.
  3. Set the “Degree of Parallelism” to 1 to ensure only one instance runs at a time.

Step 4: Preventing Future “Unable to Move File” Errors

4.1. Best Practices

✅ Ensure the user and flow have the right permissions.
✅ Use unique file names to avoid conflicts.
Close files before moving to prevent locking issues.
Use Power Automate’s error handling to retry the move operation.
✅ Regularly check storage limits to avoid quota issues.


Step 5: Set Up Error Alerts for Failed File Moves

  1. Open Power Automate → Select your flow.
  2. Add a “Send an Email” action after a failed move.
  3. Configure it to alert users about failed file moves.

Leave a Reply

Your email address will not be published. Required fields are marked *