PALATINELABSDocsENES

Pages

↑↓ to moveEnter to openEsc to close

FTP package guide

Version 2.14.1. Installed versions can differ. Examples are illustrative and not tested.

Jump to actions

Packages

Prerequisites

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:

Shared fields

FieldsInstructions
sessionName⁠, sessionThe session name that Connect gives, such as transfer⁠. Later actions in the same Run use this exact name.
transferTypebinary 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⁠.
remoteFilesRemote file paths or name masks, separated by semicolons, such as samples/invoice.txt;samples/*.log⁠. A mask looks only in the named folder, not in subfolders.
localDirectoryThe local folder to download to, such as samples/download⁠. It is created if needed. Get files puts each file directly in it. Get folders adds each source folder by name, with its subfolders.
overwritetrue 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.
fileRegexFile 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.

IDFieldType; default; requirementValue
dateFilterTypeSelect dateDateFilterTypedefault noneOptional.none⁠: no date filter. modified⁠: use the modified* fields. created⁠: use the created* fields.
modifiedDateFilterByModified date filterDateFilterBydefault day_wiseOptional.day_wise⁠: files from the last N days. between⁠: from Since up to, but not including, Before. before⁠: older than Before.
modifiedInLastDaysIn last * daysNumberdefault 0Optional.For day_wise⁠: whole days, 0 or more, such as 7⁠. With 0⁠, only files with a time from now on are kept.
modifiedBetweenSinceSinceDatetimedefault unsetOptional.For between⁠: the start, included, such as 2026-10-01T00:00:00Z⁠. Set it.
modifiedBetweenBeforeBeforeDatetimedefault unsetOptional.For between⁠: the end, not included, such as 2026-11-01T00:00:00Z⁠. Make it later than Since.
modifiedBeforeBeforeDatetimedefault unsetOptional.For before⁠: the end, not included, such as 2026-10-01T00:00:00Z⁠.
createdDateFilterByCreated date filterDateFilterBydefault day_wiseOptional.The same as modifiedDateFilterBy⁠, for the creation time.
createdInLastDaysIn last * daysNumberdefault 0Optional.The same as modifiedInLastDays⁠.
createdBetweenSinceSinceDatetimedefault unsetOptional.The same as modifiedBetweenSince⁠.
createdBetweenBeforeBeforeDatetimedefault unsetOptional.The same as modifiedBetweenBefore⁠.
createdBeforeBeforeDatetimedefault unsetOptional.The same as modifiedBefore⁠.

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

IDFieldType; default; requirementValue
sessionNameFTP/SFTP sessionStringdefault emptyOptional.Shared.
navigateToNavigate toNavigateTodefault specificOptional.specific⁠: go to Specific folder. parent⁠: go up one folder. At the root, parent stays at the root. Choices: parent⁠, specific⁠.
specificFolderSpecific folderStringdefault 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.

Back to actions

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 typeSign-in choiceFields to fill
ftpauthenticationType1=anonymousNone.
ftpauthenticationType1=username_passwordusername1 (user name), password1 (password)
ftpsauthenticationType2=anonymousNone.
ftpsauthenticationType2=username_passwordusername2 (user name), password2 (password)
sftpauthenticationType3=username (key file)keyfile1⁠, username3 (user name)
sftpauthenticationType3=username_password (key file with password)keyfile2⁠, username4 (user name), password4 (key password)
sftpauthenticationType3=user_pass (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

IDFieldType; default; requirementValue
sessionSession nameStringdefault emptyOptional.Shared.
serverNameServer nameStringdefault emptyRequired.The host name without a scheme, such as files.example.com⁠.
serverPortPortNumberdefault 21Optional.The server's port. 21 does not change for sftp or ftps⁠. Use 22 for a usual SFTP server.
serverTypeServer typeServerTypedefault ftpOptional.ftp⁠: no encryption. ftps⁠: FTP with the selected encryption mode. sftp⁠: SSH file transfer. Choices: ftp⁠, ftps⁠, sftp⁠.
authenticationType1Authentication typeFtpAuthdefault anonymousOptional.ftp only. See the sign-in table. Choices: anonymous⁠, username_password⁠.
username1UsernameCredentialdefault emptyOptional.See the sign-in table.
password1PasswordCredentialdefault emptyOptional.See the sign-in table.
transferModeTransfer modeTransferModedefault passiveOptional.FTP/FTPS only. Keep passive unless your administrator says active⁠. active needs the server to connect back to the Device. Choices: passive⁠, active⁠.
transferTypeTransfer typeTransferTypedefault binaryOptional.Shared.
defaultDirectoryDefault directoryStringdefault 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 .⁠.
authenticationType2Authentication typeFtpAuthdefault anonymousOptional.ftps only. See the sign-in table. Choices: anonymous⁠, username_password⁠.
username2UsernameCredentialdefault emptyOptional.See the sign-in table.
password2PasswordCredentialdefault emptyOptional.See the sign-in table.
encryptionTypeEncryption modeEncryptionTypedefault Explicit_Over_TLSOptional.ftps only. Explicit_Over_TLS (usual) and Explicit_Over_SSL do the same: both start TLS after connecting. Implicit encrypts from the start. None turns encryption off, also for ftps⁠. Choices: None⁠, Explicit_Over_TLS⁠, Explicit_Over_SSL⁠, Implicit⁠.
authenticationType3Authentication typeSftpAuthdefault user_passOptional.sftp only. See the sign-in table. Choices: username⁠, username_password⁠, user_pass⁠.
keyfile1Private key fileStringdefault emptyOptional.The local private key file. If it is blank, the step signs in with an empty password.
username3UsernameCredentialdefault emptyOptional.See the sign-in table.
keyfile2Private key fileStringdefault emptyOptional.The local private key file that has a password.
username4UsernameCredentialdefault emptyOptional.See the sign-in table.
password4PasswordCredentialdefault emptyOptional.The password of the key file, not of the account. If keyfile2 is blank, it is used as the account password.
username5UsernameCredentialdefault emptyOptional.See the sign-in table.
password5PasswordCredentialdefault emptyOptional.See the sign-in table.
expectedHostKeyFingerprintExpected 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.
isReconnectEnabledReconnect if connection failsBooleandefault falseOptional.true tries Connect again when it fails. A session that drops later is not reconnected.
reconnectAttemptsAttemptsNumberdefault 1Optional.The total number of tries, with the first one. Values below 1 become 1. Used only when reconnect is true⁠.
reconnectIntervalInSecondTime between attemptsNumberdefault 1Optional.Seconds between tries, 0 or more, such as 1⁠.
allowInsecureConnectionAccept any server certificateBooleandefault 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

IDTypeResult
sessionNameStringThe Session name you entered. Save it in a String such as ftpSession 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.

Back to actions

Create folder (ftpCreateFolder)

Create a remote folder.

Inputs

IDFieldType; default; requirementValue
sessionNameFTP/SFTP sessionStringdefault emptyOptional.Shared.
folderNameRemote folderStringdefault emptyRequired.The folder to create, such as samples/new⁠. 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.

Back to actions

Delete files (ftpDeleteFiles)

Delete remote files. There is no undo, so try it on test files.

Inputs

IDFieldType; default; requirementValue
sessionNameFTP/SFTP sessionStringdefault emptyOptional.Shared.
remoteFilesRemote filesStringdefault 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.

Back to actions

Delete folder (ftpDeleteFolder)

Delete a remote folder with all its files and subfolders.

Inputs

IDFieldType; default; requirementValue
sessionNameFTP/SFTP sessionStringdefault emptyOptional.Shared.
remoteFolderRemote folderStringdefault emptyRequired.The exact folder to delete, such as samples/remove⁠. 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.

Back to actions

Disconnect (ftpDisconnect)

Close the session.

Inputs

IDFieldType; default; requirementValue
sessionNameFTP/SFTP sessionStringdefault 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.

Back to actions

Get files (ftpGetFiles)

Download remote files into one local folder, with an optional date filter.

Inputs

IDFieldType; default; requirementValue
sessionNameFTP/SFTP sessionStringdefault emptyOptional.Shared.
remoteFilesRemote filesStringdefault emptyRequired.Shared.
localDirectoryLocal folderStringdefault emptyRequired.Shared.
transferTypeTransfer typeTransferTypedefault binaryOptional.Shared.
overwriteOverwrite 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.

Back to actions

Get folders (ftpGetFolder)

Download remote folders with their names and subfolders.

Inputs

IDFieldType; default; requirementValue
sessionNameFTP/SFTP sessionStringdefault emptyOptional.Shared.
remoteDirectoryRemote folderStringdefault emptyRequired.Remote folders separated by semicolons, such as samples⁠. Do not end a path with /⁠: the last folder name becomes the local folder name.
fileRegexFile typeStringdefault emptyOptional.Shared.
localDirectoryLocal folderStringdefault emptyRequired.Shared.
overwriteOverwrite 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.

Back to actions

List folder (ftpListFolder)

Get the names of the items directly inside one remote folder.

Inputs

IDFieldType; default; requirementValue
sessionNameFTP/SFTP sessionStringdefault emptyOptional.Shared.
remoteFolderRemote folderStringdefault emptyOptional.The folder to list, such as samples⁠. Empty lists the current remote folder. Their contents are not listed.
fileRegexFile typeStringdefault emptyOptional.Shared.
foldersOnlyFolders onlyBooleandefault falseOptional.true gives only folder names. false gives the matching file names and all folder names.

Outputs

IDTypeResult
foldersListThe 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.

Back to actions

Put files (ftpPutFiles)

Upload local files into the current remote folder. Local folder names are not kept.

Inputs

IDFieldType; default; requirementValue
sessionNameFTP/SFTP sessionStringdefault emptyOptional.Shared.
filesLocal filesStringdefault emptyRequired.Local file paths or name masks, separated by semicolons, such as samples/upload.txt;samples/*.csv⁠. Each file goes into the current remote folder by its name. A missing exact file fails.
transferTypeTransfer typeTransferTypedefault binaryOptional.Shared.
overwriteOverwrite 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.

Back to actions

Put folders (ftpPutFolder)

Upload local folders, with their names and subfolders, into the current remote folder.

Inputs

IDFieldType; default; requirementValue
sessionNameFTP/SFTP sessionStringdefault emptyOptional.Shared.
directoryNamesLocal folderStringdefault emptyRequired.Local folders that exist, separated by semicolons, such as samples/payload⁠. Each one goes into the current remote folder under its own name.
fileTypesFile typesStringdefault emptyOptional.File masks separated by semicolons, such as *.txt;*.csv⁠. Empty means all files. Subfolders are still created.
overwriteOverwrite 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.

Back to actions

Rename files (ftpRenameFile)

Rename one remote file in its folder.

Inputs

IDFieldType; default; requirementValue
sessionNameFTP/SFTP sessionStringdefault emptyOptional.Shared.
renameFromRemote fileStringdefault emptyRequired.One exact remote file path, such as samples/invoice.txt⁠. Masks do not work here.
renameToNew remote fileStringdefault 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.

Back to actions