> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](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).

# 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><p><img src="/files/t7kJOOieOPHlyvI5HXA7" alt="" data-size="original"></p></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><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><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><p><img src="/files/UuwhLDkqWHDA11jHFbga" alt="" data-size="original"></p><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><p><img src="/files/GMcEV36YCRpopOevcy3Y" alt="" data-size="original"></p></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><p><img src="/files/mZqeMI0F7sb0sONagwZw" alt="" data-size="original"></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><p><img src="/files/Nt8xT6lxO3Fa8Ebqrx3c" alt="" data-size="original"></p></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><p><img src="/files/eNvFlTpnSd85cpxmaBZz" alt="" data-size="original"></p><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><p><img src="/files/IXEjzcUAId9M71lercaF" alt="" data-size="original"></p><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>
