> 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.md).

# Valid FTP commands

## Valid FTP commands

Valid FTP commands for the SFTP connector are summarised in the following sections:

* [File retrieval](#file-retrieval)
* [File operations](#file-operations)
* [Information & metadata](#information-and-metadata)

### File retrieval &#x20;

<table><thead><tr><th width="215.41015625">FTP command</th><th>Summary</th></tr></thead><tbody><tr><td><a href="/pages/9qm8RafqyEm0OZsg0lb3">get_and_move</a></td><td>Retrieve a file, load its content into the process flow as a payload, then move the file to another directory on the remote server. If multiple files are retrieved, multiple payloads are generated (one payload per file).</td></tr><tr><td><a href="/pages/cRTl2b1MG6LTAU1UFh76">pluck</a></td><td>Retrieve file(s), load content into the process flow as payload(s) and then delete file(s) from the remote server. If multiple files are retrieved, multiple payloads are generated (one payload per file).</td></tr></tbody></table>

### File operations

<table><thead><tr><th width="215.41015625">FTP command</th><th>Summary</th></tr></thead><tbody><tr><td><a href="/pages/AEBYW9I6We4vUM4iX8Bw">append</a></td><td>Add content from target file(s) to the end of source file(s).</td></tr><tr><td><a href="/pages/lt2MewqlNVYJEbnR9os0">copy</a></td><td>Copy file(s) from one directory to another directory on the remote server (so the file exists in both directories).</td></tr><tr><td><a href="/pages/w0rVVKmfZexTdkXOMsT2">rename</a></td><td>Rename file(s). This operation can be combined with moving the files. </td></tr><tr><td><a href="/pages/LJhc2JOJUNps02DTBhYm">delete</a></td><td>Remove file(s).</td></tr><tr><td>put_non_empty</td><td>Upload file(s) only if it has content (i.e. avoid uploading empty files).</td></tr></tbody></table>

### Information & metadata

<table><thead><tr><th width="215.41015625">FTP command</th><th>Summary</th></tr></thead><tbody><tr><td><a href="/pages/AlXrpABDAFDPhBszVeCI">list</a></td><td>List files in a directory on the remote server. Information is loaded into the process flow as a single payload. </td></tr><tr><td>size</td><td>Get file sizes from a directory on the remote server. Information is loaded into the process flow as a single payload. </td></tr><tr><td>modified</td><td>Get the last modified date/time (UTC format) from a directory on the remote server. Information is loaded into the process flow as a single payload. </td></tr><tr><td>mime</td><td>Get/detect MIME type of file(s). A boolean value is returned for each file.</td></tr><tr><td>exists</td><td>Check if a file exists.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` 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.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
