Move file or folder
Move a file or folder into another folder in the same drive, optionally renaming it.
Command in the Microsoft 365 toolkit · id ooa.microsoft365/move_item · 7 inputs (2 required), 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Access token | Credential | No | Microsoft Graph access token from the vault; or leave it empty and choose a connection that signs in, which gets and renews the token. | |
| Item | String | Yes | Path in the drive (e.g. Reports/q4.xlsx), or id:{item-id}. | |
| To folder | String | Yes | Destination folder path (empty for the root), or id:{item-id}. | |
| New name | String | No | New name; unchanged when empty. | |
| If exists | String | No | fail | When the name is taken at the destination: fail, rename (add a number) or replace. |
| Drive | String | No | me/drive | Whose files: me/drive (your OneDrive), a person (ann@acme.com), a SharePoint site (contoso.sharepoint.com:/sites/Finance), a library of a site by name (contoso.sharepoint.com:/sites/Finance:/Invoices), or sites/{site-id}/drive or drives/{drive-id}. With an app sign-in, name a person or site. |
| Endpoint address | String | No | https://graph.microsoft.com/v1.0 | Graph endpoint; change only for national clouds or testing. |
Outputs
| Output | Type | What it is |
|---|---|---|
| item_id | String | Item id. |
| web_url | String | Link to the item in its new place. |