> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.utils.ftp.RenameFile

- Component: `appmixer.utils.ftp.RenameFile`
- Kind: Action
- Version: 1.1.0
- Visibility: Public
- Connector: [appmixer.utils.ftp 1.4.2](https://connectors.appmixer.com/connector/appmixer.utils.ftp/1.4.2.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.utils.ftp/1.4.2/component/appmixer.utils.ftp.RenameFile>

Rename a file. Depending on the server you may also use this to move a file to another directory by providing full paths.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Path (`path`) | text | The path to a file to rename. E.g. "/tmp/README.txt" |
| New Path (`newPath`) | text | The new path to a file. E.g. "/tmp/README_RENAMED.txt" |

## Output ports

### Port `out`

_No fields defined for this port._

### Port `notFound`

| Field | Type | Description |
| --- | --- | --- |
| Path (`path`) | string | - |
| Error Code (`errorCode`) | integer | - |
| Error Message (`errorMessage`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.utils.ftp.RenameFile",
  "author": "David Durman <david@client.io>",
  "description": "Rename a file. Depending on the server you may also use this to move a file to another directory by providing full paths.",
  "auth": {
    "service": "appmixer:utils:ftp"
  },
  "version": "1.1.0",
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "newPath": {
            "type": "string"
          }
        }
      },
      "inspector": {
        "inputs": {
          "path": {
            "type": "text",
            "label": "Path",
            "index": 1,
            "tooltip": "The path to a file to rename. E.g. \"/tmp/README.txt\""
          },
          "newPath": {
            "type": "text",
            "label": "New Path",
            "index": 2,
            "tooltip": "The new path to a file. E.g. \"/tmp/README_RENAMED.txt\""
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": []
    },
    {
      "name": "notFound",
      "options": [
        {
          "label": "Path",
          "value": "path",
          "schema": {
            "type": "string",
            "example": "/uploads/invoice-1001.pdf"
          }
        },
        {
          "label": "Error Code",
          "value": "errorCode",
          "schema": {
            "type": "integer",
            "example": 550
          }
        },
        {
          "label": "Error Message",
          "value": "errorMessage",
          "schema": {
            "type": "string",
            "example": "File not found, or you don't have permissions to access it."
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
