> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Move File

> Move a file or folder to another folder within the same SharePoint document library, optionally renaming it

Move a file or folder to another folder within the same SharePoint document library, optionally renaming it. Folders move with all their contents.

|                       |                         |
| --------------------- | ----------------------- |
| **App**               | Microsoft SharePoint    |
| **Operation ID**      | `sharepoint_move_file`  |
| **Type**              | Action                  |
| **Connection**        | `sharepoint` (required) |
| **Credits per run**   | 1                       |
| **Agent / MCP tool**  | Yes                     |
| **Requires approval** | Yes (write operation)   |

## Inputs

| Field                | Type                 | Required | Default | Description                                                                                                                                              |
| -------------------- | -------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `site`               | string or SelectItem | No       | -       | SharePoint site the document library belongs to, or 'me' for the user's own OneDrive.                                                                    |
| `drive`              | string or SelectItem | No       | -       | Document library (drive) the file lives in. Not needed when file is a full SharePoint link.                                                              |
| `file`               | string               | Yes      | -       | The file or folder to operate on: a path inside the library, e.g. 'Creative Ads/banner.png', a full SharePoint link, or an item id from a previous node. |
| `destination_folder` | string               | No       | -       | Destination folder in the same document library: a path, e.g. 'Approved/Q4', or a full SharePoint folder link. Leave empty to move to the library root.  |
| `new_name`           | string               | No       | -       | Optionally rename the file while moving it.                                                                                                              |

### SelectItem

| Field   | Type   | Required | Default | Description                                                                                          |
| ------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | -       | The value of the selectable item.                                                                    |
| `label` | string | Yes      | -       | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

## Output

**Type**: `Dict`

Returns the moved file.

**Fields**: `file_id`, `file_name`, `file_url`, `file_type`
