# Rename Folder

Renames the folder in the same parent folder. If `NewName` is empty, the current name is used.


---

### :arrow_left:**INPUT**

| **Parameter** | **Type** | **Required** | **Description** |
|-----------|------|----------|-------------|
| `ConnectionSettings` | `PAWOffice365ConnectionSettings` | ✅Yes     | OneDrive or SharePoint connection settings |
| `SourcePath` | `String` | ✅Yes     | Current folder path |
| `NewName` | `String` | ❌No      | New folder name |
| `Overwrite` | `Boolean` | ❌No      | Overwrite if a folder with the same name exists (default: false) |


---

### :arrow_right:**OUTPUT**

| **Parameter** | **Type** | **Description** |
|-----------|------|-------------|
| `IsOffice365RenameFolderSuccessful` | `Boolean` | Operation success status |
| `Office365RenameFolderMessage` | `String` | Status/error message |
| `Office365RenameFolderPath` | `String` | New folder path |


---

### :arrow_down:**MISC**

| **Parameter** | **Type** | **Default** | **Description** |
|-----------|------|---------|-------------|
| `ThrowException` | `Boolean` | ❌No     | Specifies whether an exception is thrown when the operation fails. The default value is "**No**". |