# append (FTP command)

## Overview

The `append` command takes the incoming payload (either from another file on your remote server or some other source) and appends this content to a specified file on the remote server.

## Connection settings

When [configuring an SFTP connector](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape/configuring-sftp-connections.md), three fields should be updated:

| FTP command                | Root                                                                                                                                                                          | Path                                                                                          |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| FTP command only: `append` | The root to the directory where the source file is located. You could enter just `/` and then a full path in the  `path` field, or you can provide the full path as the root. | The source file (i.e. the file which contains content you want to append to the target file). |

## Example

* [Scenario](#scenario)
* [The steps](#the-steps)

### Scenario

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><p>Our process flow is configured as follows:</p><div><figure><img src="/files/t7kJOOieOPHlyvI5HXA7" alt=""><figcaption></figcaption></figure></div></td><td><a href="/files/rI8jPerjv9MFfSCvdBbq">/files/rI8jPerjv9MFfSCvdBbq</a></td></tr><tr><td><p>In this flow, we have three SFTP shapes, each with a different task:</p><p></p><p><strong>SFTP shape 1</strong><br>Retrieve the a list of fruit from a <code>summer.txt</code> file from <code>/myfiles/folderA</code> </p><p></p><p><strong>SFTP shape 2</strong><br>Append this content this to another list of fruit in a file named <code>winter.txt</code>, which is also stored in <code>/myfiles/folderA</code>:</p><div align="left"><figure><img src="/files/UuwhLDkqWHDA11jHFbga" alt=""><figcaption></figcaption></figure></div><p><strong>SFTP shape 3</strong><br>Get the full list of fruit from <code>winter.txt</code> and load it into the flow. </p></td><td><a href="/files/2vpVY6Q37YrYqTgeZirK">/files/2vpVY6Q37YrYqTgeZirK</a></td></tr></tbody></table>

### The steps

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><p><strong>Connector settings for SFTP shape 1</strong></p><p>Our first SFTP shape is configured to retrieve content to append, from <code>/myfiles/folderA/summer.txt</code> . Connector settings are defined using a <code>get</code> command, as follows:</p><div align="left"><figure><img src="/files/GMcEV36YCRpopOevcy3Y" alt=""><figcaption></figcaption></figure></div></td><td><a href="/files/oMb9sRQ3X0NcUlY4i8Mk">/files/oMb9sRQ3X0NcUlY4i8Mk</a></td></tr><tr><td><p><strong>Payload from SFTP shape 1</strong></p><p>When the process flow is run, the payload for our first SFTP shape shows the content in <code>/myfiles/folderA/summer.txt</code> :</p><div align="left"><figure><img src="/files/mZqeMI0F7sb0sONagwZw" alt=""><figcaption></figcaption></figure></div><p></p></td><td><a href="/files/J6YFhcQQMgUmK2sBQwdu">/files/J6YFhcQQMgUmK2sBQwdu</a></td></tr><tr><td><p><strong>Connector settings for SFTP shape 2</strong></p><p>Our second SFTP shape is configured to append the current payload to our target file on the remote server -  <code>/myfiles/folderA/winter.txt</code> . Connector settings are defined as follows:</p><div align="left"><figure><img src="/files/Nt8xT6lxO3Fa8Ebqrx3c" alt=""><figcaption></figcaption></figure></div></td><td><a href="/files/CaDlvrcB9Vd1DmUVmK9d">/files/CaDlvrcB9Vd1DmUVmK9d</a></td></tr><tr><td><p><strong>Payload from SFTP shape 2</strong></p><p>When the process flow is run, the payload for our second SFTP shape shows just a <code>1</code>: </p><div align="left"><figure><img src="/files/eNvFlTpnSd85cpxmaBZz" alt=""><figcaption></figcaption></figure></div><p>A <code>1</code> indicates a successful response from your remote server. A <code>0</code> indicates an unsuccessful response from your remote server. </p></td><td><a href="/files/cJCf39wYGqnt8sQhEw0v">/files/cJCf39wYGqnt8sQhEw0v</a></td></tr><tr><td><p><strong>Connector settings for SFTP shape 3</strong></p><p>Our final SFTP shape is configured to retrieve our target file from the remote server -  <code>/myfiles/folderA/winter.txt</code> . Connector settings are defined using a <code>get</code> command, as follows:<br><br><img src="/files/SpKuuahrEkcdU1Ae0U05" alt=""></p></td><td><a href="/files/gN3YFcn9cY0fEfvafRyF">/files/gN3YFcn9cY0fEfvafRyF</a></td></tr><tr><td><p><strong>Payload from SFTP shape 3</strong></p><p>When the process flow is run, the payload for our final SFTP shape shows the content in <code>/myfiles/folderA/winter.txt</code> :</p><div align="left"><figure><img src="/files/IXEjzcUAId9M71lercaF" alt=""><figcaption></figcaption></figure></div><p>Here we can see that content from <code>/myfiles/folderA/summer.txt</code> has ben appended to original content in <code>/myfiles/folderA/winter.txt</code>.</p></td><td><a href="/files/Q4xeHdhRefSL0hGmCJ8R">/files/Q4xeHdhRefSL0hGmCJ8R</a></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape/configuring-sftp-connections/valid-ftp-commands/append-ftp-command.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
