---
schema_version: "1"
id: cef2baa3b721c30133bbdee2f708c6a8ef3c2b9dd586af9d728c9da849d7e3ab
title: Copy and Move Files with the FTP Connector Example
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/ftp-connector/latest/ftp-copy-move.md
canonical_url: https://docs.mulesoft.com/ftp-connector/latest/ftp-copy-move
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 5dc1aa8ba57cdddaa9f61c7ad457056ff76be7b8fffc2b9178fe6a604543a3ce
description: MuleSoft Documentation Site
release: "2.0"
latest: true
---
---
product: FTP Connector
version: 2.0
is-latest-version: true
---

# Copy and Move Files with the FTP Connector Example

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Anypoint Connector for FTP (FTP Connector) provides **Copy** and **Move** operations that enable you
to copy and move files or directories on demand.

While SFTP has a native concept of copying and moving, FTP does not. FTP Connector simulates these
operations by downloading file content and writing it to a new location, using concurrent streams
that start writing and reading at the same time. Because these operations create significant network
overhead, use them wisely.

## Configure the Copy Operation in Studio

To add and configure the **Copy** operation in Studio, follow these steps:

1.  In the **Mule Palette** view, search for `ftp` and select the **Copy** operation.

2.  Drag the **Copy** operation onto the Studio canvas.

3.  In the **General** tab of the operation configuration screen, click the plus sign (**+**) next
    to the **Connector configuration** field to access the global element configuration fields.

4.  Specify the connection information and click **OK**.

5.  Set **Source path** to the path of the file to copy, for example, `source.txt`.

6.  Set **Target path** to the directory path into which to copy the file, for example, `backup`.

7.  Set **Rename to** to rename the file as part of the operation, for example, `renamed.txt`.  
    This field must be a filename, not a path. If this attribute is not provided, the original
    filename is used.

![Copy operation configuration in Studio](/mulesoft/current/en-us/ftp-connector/latest/_images/ftp-copy-operation.png)

In the Configuration XML editor, the `<ftp:copy>` configuration looks like this:

```xml
<ftp:copy sourcePath="source.txt" targetPath="backup"
  overwrite="true|false" createParentDirectories="true|false"
  renameTo="renamed.txt"/>
```

## Configure the Move Operation in Studio

To add and configure the **Move** operation in Studio, follow these steps:

1.  In the **Mule Palette** view, search for `ftp` and select the **Move** operation.

2.  Drag the **Move** operation onto the Studio canvas.

3.  In the **General** tab of the operation configuration screen, click the plus sign (**+**) next
    to the **Connector configuration** field to access the global element configuration fields.

4.  Specify the connection information and click **OK**.

5.  Set **Source path** to the path of the file to move, for example, `source.txt`.

6.  Set **Target path** to the directory path into which to move the file, for example, `backup`.

7.  Set **Rename to** to rename the file as part of the operation, for example, `renamed.txt`.  
    This field must be a filename, not a path. If this attribute is not provided, the original
    filename is used.

![Move operation configuration in Studio](/mulesoft/current/en-us/ftp-connector/latest/_images/ftp-move-operation.png)

In the **Configuration XML** editor, the `<ftp:move>` configuration looks like this:

```xml
<ftp:move sourcePath="source.txt" targetPath="backup"
  overwrite="true|false" createParentDirectories="true|false"
  renameTo="renamed.txt"/>
```

## See Also

- [FTP Connector Examples](https://docs.mulesoft.com/ftp-connector/latest/ftp-examples#write)

- [Salesforce Help](https://help.salesforce.com)
