Move file or folder action in the Microsoft 365 OneDrive package - The Move file or folder action in the Microsoft 365 OneDrive package moves a file or folder from one folder to another in OneDrive.

Automation 360

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.

      Move a setting with the File option selected, showing source file name and destination folder name fields

      • 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
      • 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
    • Folder: Move a folder from one location to another.

      Move a setting with the Folder option selected, showing source folder name and destination folder name fields

      • 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
      • 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

    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.
  • 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:

Move file or folder action configured to move Invoice_2024.xlsx from the Accounts folder to Archive/2024, with Override existing file/folder selected

  • 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.