# Get File (Download)

Downloads a file from the FTP server.

If `LocalFilePath` is given, the file is written to disk and no binary output is produced. If left empty, the content is returned as \`FtpGetFileData\` / \`FtpGetFileResult\`.


---

### ⬅️**INPUT**

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ConnectionSettings` | [`PAWFtpConnectionSettings`](/doc/pawftpconnectionsettings-RcEVGpTNAG) | ✅Yes     | FTP connection details |
| `FtpFilePath` | `String` | ✅Yes     | Source file path on the FTP server |
| `LocalFilePath` | `String` | ❌No      | Specifies the local file path where the file will be saved. If left empty, the file is not physically saved; the content is returned through the GetFileResult output parameter as byte[] (Byte array) type. |
| `OverrideFile` | `Boolean` | ❌No      | Whether to overwrite the existing file (default: false) |


---

### :arrow_right:**OUTPUT**

| Parameter | Type | Description |
|-----------|------|-------------|
| `IsFtpGetFileSuccessful` | `Boolean` | Download success status |
| `FtpGetFileMessage` | `String` | Status message or error detail |
| `FtpGetFileResult` | `PAWFileData` | File name + binary data (if the `LocalFilePath` input is empty) |
| `FtpGetFileData` | `Byte[]` | Binary data (if the `LocalFilePath` input is empty) |


---

### :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**". |