---
title: t FTP and FTPS
description: Available triggers
documentId: ipaas-ftp-s-trigger
locale: en-US
---

The [**FTP**](https://camel.apache.org/components/4.10.x/ftp-component.html) component provides access to remote file systems via FTP and SFTP protocols.

<Callout type="NOTE" title="NOTE">
**FTPS** is a secure version of FTP that adds SSL/TLS support to encrypt the connection.
</Callout>

**URI Syntax**: `ftp:host:port/directoryName`

## Main fields

*Path parameters*

| **Name** | **Description** | **Default** | **Type** |
|----------|-----------------|-------------|----------|
| `host` (common)          | (required) Hostname of the FTP server. | — | String |
| `port` (common)          | Port of the FTP server.                | — | int    |
| `directoryName` (common) | Starting directory.                    | — | String |

*Query parameters*

| **Name** | **Description** | **Default** | **Type** |
|----------|-----------------|-------------|----------|
| `fileName` (common) | Used to dynamically set the file name as an expression. For consumers, it serves as a name filter; for producers, to evaluate the file name to write.              |  — | String |
| `password` (security) | Password used for authentication on the FTP server.           | — | String  |
| `username` (security) | Username used for authentication on the FTP server. | — | String  |
| `delay` (scheduler)   | Time in milliseconds before the next check/poll to consume files. | 500 | long    |
| `passiveMode` (common)| Sets connections to passive mode.          |false| boolean |
| `includeExt` (filter) | Used to include files matching the file extension name (case-insensitive). For example, to include `.txt` files, use `includeExt=txt`. Multiple extensions can be separated by commas; for example, to include `.txt` and `.xml` files, use `includeExt=txt,xml`. | — | String |

## Example


<Steps>
<Step>
The flow connects to an FTP server and downloads text files.
</Step>
<Step>
The parameters indicate the credentials used for authentication (`username` and `password`) and that the text should filter and include only files with the `.txt` extension.
</Step>
<Step>
The flow includes a 10-second delay between download attempts and operates in passive mode.

<Callout type="important" title="IMPORTANT">
Check whether the FTP server operates in **Active Mode** or **Passive Mode**. "Read timeout" errors or file reading failures may occur if the mode is not configured correctly. The `passiveMode=true` parameter should be included when the server works in passive mode. For more details about the differences between modes, see [Active Vs. Passive FTP Simplified](https://www.jscape.com/blog/active-v-passive-ftp-simplified).
</Callout>

</Step>
<Step>
Then, it logs the content of these files.
</Step>
</Steps>

<Callout type="note" title="NOTE">
In this example, files are not removed after processing because the demo server used is read-only.
</Callout>


```yaml
- from:
    uri: ftp:demo.wftpserver.com/download:/
    parameters:
      password: your-password
      username: your-username
      passiveMode: true
      includeExt: txt
      delay: 10000
    steps:
      - log:
          message: "Downloaded File Content: ${body}"
```


![](https://creative-ball-51b3fc85c0.media.strapiapp.com/component_ftp_ab53c40047.png)


### Result

```
2024-02-07 17:57:23,289 INFO  [io.quarkus] (main) Installed features: [camel-bean, camel-cloudevents, camel-core, camel-file, camel-ftp, camel-groovy-dsl, camel-k-core, camel-k-runtime, camel-knative, camel-kubernetes, cdi, groovy, jsch, kubernetes-client, smallrye-context-propagation, vertx]
2024-02-07 17:57:25,261 INFO  [route1] (Camel (camel-1) thread #1 - ftp://demo.wftpserver.com/download) Downloaded File Content
: Wing FTP Server v7.3.0              Released: 2/Jan/2024
--------------------------------------------------------------
Improvement -  Filezilla will get stuck occasionally when uploading files via FTPS/FTPES protocol.
Improvement - Removed SSH cipher "chacha20-poly1305" to avoid SSH Terrapin attacks (CVE-2023-48795).
Improvement - Improved the web client interface for the file listing and search window.
Fixed a bug - Fixed a possible crash when transferring files via FTP protocol.
Fixed a bug - Web client can't remember the selected language in the login page.

(file truncated)


```
