The Move file or folder action in the Microsoft 365 OneDrive package moves a file or folder from one folder to another in OneDrive.
Settings
- Microsoft 365 OneDrive user session: Enter the active
OneDrive session name that you provided in the Connect action. For example,
session1. - Move a: Select one of the following options:
- File: Move a file from one location to
another.
- Source file name on OneDrive (including path &
extension): Enter the full path and file name, or the
shared file link of the file to move. For example:
- OneDrive file:
/<UserHomeDirectory>/Accounts/SalesReport.xlsx - OneDrive shared file link:
https://companyname-my.sharepoint.com/:b:/g/personal/.....&at=9
- OneDrive file:
- Destination folder name on OneDrive (including
path): Enter the full path of the destination folder, or
the shared folder link. For example:
- OneDrive folder:
/<UserHomeDirectory>/NewAccounts - OneDrive shared folder link:
https://companyname-my.sharepoint.com/:b:/g/personal/.....&at=9
- OneDrive folder:
- Source file name on OneDrive (including path &
extension): Enter the full path and file name, or the
shared file link of the file to move. For example:
- Folder: Move a folder from one location to
another.
- Source folder name on OneDrive (including path):
Enter the full path of the source folder, or the shared folder link. For
example:
- OneDrive folder:
/<UserHomeDirectory>/Accounts/Jan19 - OneDrive shared folder link:
https://companyname-my.sharepoint.com/:b:/g/personal/.....&at=9
- OneDrive folder:
- Destination folder name on OneDrive (including
path): Enter the full path of the destination folder, or
the shared folder link. For example:
- OneDrive folder:
/<UserHomeDirectory>/NewAccounts - OneDrive shared folder link:
https://companyname-my.sharepoint.com/:b:/g/personal/.....&at=9
- OneDrive folder:
- Source folder name on OneDrive (including path):
Enter the full path of the source folder, or the shared folder link. For
example:
To share a file or folder link, see Share OneDrive files and folders.
Note: The forward slash that indicates that a file or folder is located in the root directory is optional. - File: Move a file from one location to
another.
- Override existing file/folder (if present): Select this option to replace an existing file or folder with the same name at the destination.
Example
In this example, a bot moves a processed invoice file from a working folder to an archive folder in OneDrive after completing a payment workflow.
Configure the Move file or folder action with the following settings:
- Microsoft 365 OneDrive user session:
Microsoft365OneDriveUserSession - Move a: File
- Source file name on OneDrive (including path & extension):
/<UserHomeDirectory>/Accounts/Invoice_2024.xlsx - Destination folder name on OneDrive (including path):
/<UserHomeDirectory>/Archive/2024 - Override existing file/folder (if present): Selected
After the action runs, Invoice_2024.xlsx is moved from
/Accounts/ to /Archive/2024/. If a file with the same
name already exists in the destination, it is replaced.