FTP package guide
Version 2.14.1. Installed versions can differ. Examples are illustrative and not tested.
Prerequisites
- Use an FTP, FTPS or SFTP server that the Device can reach, and an account with the folder and file permissions you need.
- Set the port. The default is
21for every server type, so set22for a usual SFTP server and the server's port for FTPS. - FTP sends data without encryption. FTPS uses TLS and checks the server certificate, unless Accept any server certificate is on. SFTP checks the server's host key.
- A session lasts one Run. Use a new session name for a second connection, and run Disconnect at the end.
- Remote paths use
/. A path that does not start with/starts in the current remote folder. Local relative paths start in the Run's working folder. - Lists of paths and masks use semicolons, not commas. A mask matches the whole name and ignores case:
*is any text and?is one character. Masks are not regular expressions. Local wildcards in Put files follow the local file system's rules. - A mask that matches nothing transfers or deletes nothing. An exact path that does not exist usually gives a server error. If a later file fails, the files done before it stay done.
SFTP host key. Ask your administrator for the server's SHA-256 fingerprint and put it in Connect. If you leave it blank, the first connection trusts and saves the key for that host and port, and a later different key is refused. Saved keys are kept for the account on the Device, also for later Runs, and SSH sessions of the Terminal emulator package use the same saved keys. With a blank fingerprint, a damaged saved-keys file fails the connection rather than trusting a new key.
Sample files. The examples use session transfer from Connect: Server name=files.example.com, Server type=sftp, Port=22, Authentication type (authenticationType3)=user_pass, with username5 and password5 bound to a test Credential. Unless an example changes folder, it starts in the login folder. Prepare these test files:
- Remote: folder
sampleswithinvoice.txt(textInvoice sample),skip.bin, and foldersubwithdetails.txt. - Local:
samples/upload.txt(textUpload sample) andsamples/payload/note.txt(textPayload sample).
Shared fields
| Fields | Instructions |
|---|---|
session, session | The session name that Connect gives, such as transfer. Later actions in the same Run use this exact name. |
transfer | binary keeps the bytes. ascii asks FTP/FTPS for ASCII mode, which can change line endings. SFTP always sends bytes. Folder transfers use the session's setting. Choices: binary, ascii. |
remote | Remote file paths or name masks, separated by semicolons, such as samples/. A mask looks only in the named folder, not in subfolders. |
local | The local folder to download to, such as samples/. It is created if needed. Get files puts each file directly in it. Get folders adds each source folder by name, with its subfolders. |
overwrite | true replaces files with the same name. For downloads, false keeps the local file. For FTP/FTPS uploads, false skips the remote file. For SFTP uploads, false can fail when the file exists. |
file | File masks separated by semicolons, such as *.txt;*.csv. Empty means all files. Folders are not filtered by the mask. |
Date filter
Get files and Get folders use these date filter fields. The filter uses the server's file times in UTC. If the server gives no creation time, created uses the modified time. SFTP always uses the modified time. A file with no time is always kept. Only the fields of the selected filter are used.
| ID | Field | Type; default; requirement | Value |
|---|---|---|---|
date | Select date | Datedefault noneOptional. | none: no date filter. modified: use the modified* fields. created: use the created* fields. |
modified | Modified date filter | Datedefault day_Optional. | day_: files from the last N days. between: from Since up to, but not including, Before. before: older than Before. |
modified | In last * days | Numberdefault 0Optional. | For day_: whole days, 0 or more, such as 7. With 0, only files with a time from now on are kept. |
modified | Since | Datetimedefault unsetOptional. | For between: the start, included, such as 2026-10-01. Set it. |
modified | Before | Datetimedefault unsetOptional. | For between: the end, not included, such as 2026-11-01. Make it later than Since. |
modified | Before | Datetimedefault unsetOptional. | For before: the end, not included, such as 2026-10-01. |
created | Created date filter | Datedefault day_Optional. | The same as modified, for the creation time. |
created | In last * days | Numberdefault 0Optional. | The same as modified. |
created | Since | Datetimedefault unsetOptional. | The same as modified. |
created | Before | Datetimedefault unsetOptional. | The same as modified. |
created | Before | Datetimedefault unsetOptional. | The same as modified. |
Actions
Bind each output to a variable of the stated type.
Change folder (ftpChangeFolder)
Change the session's remote folder for later relative paths and uploads.
Inputs
| ID | Field | Type; default; requirement | Value |
|---|---|---|---|
session | FTP/SFTP session | Stringdefault emptyOptional. | Shared. |
navigate | Navigate to | Navigatedefault specificOptional. | specific: go to Specific folder. parent: go up one folder. At the root, parent stays at the root. Choices: parent, specific. |
specific | Specific folder | Stringdefault emptyOptional. | For specific, required: a remote folder that exists, such as samples. |
Outputs
None.
Example
Set FTP/SFTP session=transfer, Navigate to=specific and Specific folder=samples.
Expected result
Later Put files steps upload into samples. A second Change folder with Navigate to=parent goes back up. A missing folder or one you cannot open fails.
Connect (ftpConnect)
Open a named FTP, FTPS or SFTP session. The retry fields retry only this step, not later transfers.
Each server type has its own sign-in fields:
| Server type | Sign-in choice | Fields to fill |
|---|---|---|
ftp | authentication | None. |
ftp | authentication | username1 (user name), password1 (password) |
ftps | authentication | None. |
ftps | authentication | username2 (user name), password2 (password) |
sftp | authentication (key file) | keyfile1, username3 (user name) |
sftp | authentication (key file with password) | keyfile2, username4 (user name), password4 (key password) |
sftp | authentication (user name and password) | username5 (user name), password5 (account password) |
For a user name field, the step reads only the Credential's user name. For a password field, it reads only the Credential's password.
Inputs
| ID | Field | Type; default; requirement | Value |
|---|---|---|---|
session | Session name | Stringdefault emptyOptional. | Shared. |
server | Server name | Stringdefault emptyRequired. | The host name without a scheme, such as files.example.com. |
server | Port | Numberdefault 21Optional. | The server's port. 21 does not change for sftp or ftps. Use 22 for a usual SFTP server. |
server | Server type | Serverdefault ftpOptional. | ftp: no encryption. ftps: FTP with the selected encryption mode. sftp: SSH file transfer. Choices: ftp, ftps, sftp. |
authentication | Authentication type | Ftpdefault anonymousOptional. | ftp only. See the sign-in table. Choices: anonymous, username_. |
username1 | Username | Credentialdefault emptyOptional. | See the sign-in table. |
password1 | Password | Credentialdefault emptyOptional. | See the sign-in table. |
transfer | Transfer mode | Transferdefault passiveOptional. | FTP/FTPS only. Keep passive unless your administrator says active. active needs the server to connect back to the Device. Choices: passive, active. |
transfer | Transfer type | Transferdefault binaryOptional. | Shared. |
default | Default directory | Stringdefault emptyOptional. | A remote folder that exists, to go to after sign-in, such as samples. Empty: FTP/FTPS stay in the login folder, and SFTP uses .. |
authentication | Authentication type | Ftpdefault anonymousOptional. | ftps only. See the sign-in table. Choices: anonymous, username_. |
username2 | Username | Credentialdefault emptyOptional. | See the sign-in table. |
password2 | Password | Credentialdefault emptyOptional. | See the sign-in table. |
encryption | Encryption mode | Encryptiondefault Explicit_Optional. | ftps only. Explicit_ (usual) and Explicit_ do the same: both start TLS after connecting. Implicit encrypts from the start. None turns encryption off, also for ftps. Choices: None, Explicit_, Explicit_, Implicit. |
authentication | Authentication type | Sftpdefault user_Optional. | sftp only. See the sign-in table. Choices: username, username_, user_. |
keyfile1 | Private key file | Stringdefault emptyOptional. | The local private key file. If it is blank, the step signs in with an empty password. |
username3 | Username | Credentialdefault emptyOptional. | See the sign-in table. |
keyfile2 | Private key file | Stringdefault emptyOptional. | The local private key file that has a password. |
username4 | Username | Credentialdefault emptyOptional. | See the sign-in table. |
password4 | Password | Credentialdefault emptyOptional. | The password of the key file, not of the account. If keyfile2 is blank, it is used as the account password. |
username5 | Username | Credentialdefault emptyOptional. | See the sign-in table. |
password5 | Password | Credentialdefault emptyOptional. | See the sign-in table. |
expected | Expected SFTP host key fingerprint (SHA-256) | Stringdefault emptyOptional. | sftp only. The server's SHA-256 fingerprint from your administrator. The SHA256: prefix and the = at the end are optional. The fingerprint is case-sensitive. Blank trusts the first key and refuses a later change. See Prerequisites. |
is | Reconnect if connection fails | Booleandefault falseOptional. | true tries Connect again when it fails. A session that drops later is not reconnected. |
reconnect | Attempts | Numberdefault 1Optional. | The total number of tries, with the first one. Values below 1 become 1. Used only when reconnect is true. |
reconnect | Time between attempts | Numberdefault 1Optional. | Seconds between tries, 0 or more, such as 1. |
allow | Accept any server certificate | Booleandefault falseOptional. | FTPS only. true accepts any certificate, also one that is not trusted. Keep false. It has no effect on the SFTP host key. |
Outputs
| ID | Type | Result |
|---|---|---|
session | String | The Session name you entered. Save it in a String such as ftp and use it in later actions. |
Example
Use the SFTP settings from the sample files in Prerequisites with Session name=transfer and Default directory empty. Save the output in ftpSession. To sign in with a private key, choose username or username_password and fill the fields from the sign-in table.
Expected result
ftpSession=transfer, and later actions can use the session. A refused key, a wrong password, a TLS error or a default folder that cannot be opened stops the step, and no session is saved.
Create folder (ftpCreateFolder)
Create a remote folder.
Inputs
| ID | Field | Type; default; requirement | Value |
|---|---|---|---|
session | FTP/SFTP session | Stringdefault emptyOptional. | Shared. |
folder | Remote folder | Stringdefault emptyRequired. | The folder to create, such as samples/. FTP/FTPS create missing parent folders. SFTP does not: create each parent first. |
Outputs
None.
Example
Set FTP/SFTP session=transfer and Remote folder=samples/new.
Expected result
The remote folder samples/new exists. Missing permissions, a missing SFTP parent or an existing item with that name can fail the step.
Delete files (ftpDeleteFiles)
Delete remote files. There is no undo, so try it on test files.
Inputs
| ID | Field | Type; default; requirement | Value |
|---|---|---|---|
session | FTP/SFTP session | Stringdefault emptyOptional. | Shared. |
remote | Remote files | Stringdefault emptyRequired. | Shared. |
Outputs
None.
Example
Create test files samples/remove1.log and samples/remove2.log. Set FTP/SFTP session=transfer and Remote files=samples/remove?.log.
Expected result
Both .log files are deleted, and invoice.txt stays. A mask with no match deletes nothing. A missing exact path or a denied delete can fail.
Delete folder (ftpDeleteFolder)
Delete a remote folder with all its files and subfolders.
Inputs
| ID | Field | Type; default; requirement | Value |
|---|---|---|---|
session | FTP/SFTP session | Stringdefault emptyOptional. | Shared. |
remote | Remote folder | Stringdefault emptyRequired. | The exact folder to delete, such as samples/. All files and subfolders are deleted. |
Outputs
None.
Example
Prepare the test file samples/remove/sub/note.txt. Set FTP/SFTP session=transfer and Remote folder=samples/remove.
Expected result
The whole remove folder is gone. Nothing goes to a trash folder. A missing folder or a denied delete fails, and part of the folder can stay.
Disconnect (ftpDisconnect)
Close the session.
Inputs
| ID | Field | Type; default; requirement | Value |
|---|---|---|---|
session | FTP/SFTP session | Stringdefault emptyOptional. | Shared. |
Outputs
None.
Example
After the other examples, set FTP/SFTP session=transfer.
Expected result
The connection closes. Later actions that use transfer fail until Connect runs again. Disconnect fails if no session has that name.
Get files (ftpGetFiles)
Download remote files into one local folder, with an optional date filter.
Inputs
| ID | Field | Type; default; requirement | Value |
|---|---|---|---|
session | FTP/SFTP session | Stringdefault emptyOptional. | Shared. |
remote | Remote files | Stringdefault emptyRequired. | Shared. |
local | Local folder | Stringdefault emptyRequired. | Shared. |
transfer | Transfer type | Transferdefault binaryOptional. | Shared. |
overwrite | Overwrite file(s) | Booleandefault trueOptional. | Shared. |
Also uses the date filter fields.
Outputs
None.
Example
Set FTP/SFTP session=transfer, Remote files=samples/invoice.txt, Local folder=samples/download, Transfer type=binary, Overwrite file(s)=false and Select date=none.
Expected result
samples/download/invoice.txt contains Invoice sample. A local file that already exists does not change. For a date example, choose modified, between, Since=2026-10-01T00:00:00Z and Before=2026-11-01T00:00:00Z: only files with a time in that range download, and files with no time also download.
Get folders (ftpGetFolder)
Download remote folders with their names and subfolders.
Inputs
| ID | Field | Type; default; requirement | Value |
|---|---|---|---|
session | FTP/SFTP session | Stringdefault emptyOptional. | Shared. |
remote | Remote folder | Stringdefault emptyRequired. | Remote folders separated by semicolons, such as samples. Do not end a path with /: the last folder name becomes the local folder name. |
file | File type | Stringdefault emptyOptional. | Shared. |
local | Local folder | Stringdefault emptyRequired. | Shared. |
overwrite | Overwrite file(s) | Booleandefault trueOptional. | Shared. |
Also uses the date filter fields.
Outputs
None.
Example
Set FTP/SFTP session=transfer, Remote folder=samples, File type=*.txt, Local folder=downloads, Overwrite file(s)=false and Select date=none.
Expected result
The files are at downloads/samples/invoice.txt and downloads/samples/sub/details.txt. skip.bin is not downloaded. All folders are created, also when they hold no matching file. A denied listing or download can leave only part of the folders.
List folder (ftpListFolder)
Get the names of the items directly inside one remote folder.
Inputs
| ID | Field | Type; default; requirement | Value |
|---|---|---|---|
session | FTP/SFTP session | Stringdefault emptyOptional. | Shared. |
remote | Remote folder | Stringdefault emptyOptional. | The folder to list, such as samples. Empty lists the current remote folder. Their contents are not listed. |
file | File type | Stringdefault emptyOptional. | Shared. |
folders | Folders only | Booleandefault falseOptional. | true gives only folder names. false gives the matching file names and all folder names. |
Outputs
| ID | Type | Result |
|---|---|---|
folders | List | The names, sorted by character code, not full paths. Save it in a List such as entries. No match gives an empty List. |
Example
Set FTP/SFTP session=transfer, Remote folder=samples, File type=*.txt and Folders only=false. Save Entries in entries.
Expected result
The List contains invoice.txt and sub. The folder sub is listed although the mask is *.txt. With Folders only=true, the List contains only sub. An empty folder gives an empty List.
Put files (ftpPutFiles)
Upload local files into the current remote folder. Local folder names are not kept.
Inputs
| ID | Field | Type; default; requirement | Value |
|---|---|---|---|
session | FTP/SFTP session | Stringdefault emptyOptional. | Shared. |
files | Local files | Stringdefault emptyRequired. | Local file paths or name masks, separated by semicolons, such as samples/. Each file goes into the current remote folder by its name. A missing exact file fails. |
transfer | Transfer type | Transferdefault binaryOptional. | Shared. |
overwrite | Overwrite file(s) | Booleandefault trueOptional. | Shared. |
Outputs
None.
Example
Use Change folder to go to the remote samples folder. Set FTP/SFTP session=transfer, Local files=samples/upload.txt, Transfer type=binary and Overwrite file(s)=false.
Expected result
The remote file samples/upload.txt contains Upload sample. If it already exists, FTP/FTPS skip it, and SFTP can fail. A missing exact local file fails before its upload.
Put folders (ftpPutFolder)
Upload local folders, with their names and subfolders, into the current remote folder.
Inputs
| ID | Field | Type; default; requirement | Value |
|---|---|---|---|
session | FTP/SFTP session | Stringdefault emptyOptional. | Shared. |
directory | Local folder | Stringdefault emptyRequired. | Local folders that exist, separated by semicolons, such as samples/. Each one goes into the current remote folder under its own name. |
file | File types | Stringdefault emptyOptional. | File masks separated by semicolons, such as *.txt;*.csv. Empty means all files. Subfolders are still created. |
overwrite | Overwrite file(s) | Booleandefault trueOptional. | Shared. |
Outputs
None.
Example
Use Change folder to go to the remote samples folder. Set FTP/SFTP session=transfer, Local folder=samples/payload, File types=*.txt and Overwrite file(s)=true.
Expected result
The remote file samples/payload/note.txt contains Payload sample. Remote files with the same name are replaced. Subfolders are created, also when they hold no matching file. With SFTP, the step can fail if the folder already exists on the server, also with Overwrite file(s)=true. A missing local folder or a denied remote folder fails.
Rename files (ftpRenameFile)
Rename one remote file in its folder.
Inputs
| ID | Field | Type; default; requirement | Value |
|---|---|---|---|
session | FTP/SFTP session | Stringdefault emptyOptional. | Shared. |
rename | Remote file | Stringdefault emptyRequired. | One exact remote file path, such as samples/. Masks do not work here. |
rename | New remote file | Stringdefault emptyRequired. | Only the new name, such as invoice-renamed.txt. A path, /, \, . or .. is refused. The file stays in its folder. |
Outputs
None.
Example
Set FTP/SFTP session=transfer, Remote file=samples/invoice.txt and New remote file=invoice-renamed.txt.
Expected result
The file is now samples/invoice-renamed.txt, with the same content. new/invoice.txt is refused as a new name. A missing file or a name already in use can fail at the server.