PROCESIO
OverviewPlatform ActionsIntegrations & DemosMarketplaceCustom ActionsDeveloperโ€™s Guide

Get File List

Lists the files and/or folders in a folder on an SFTP or FTP server, with their name, path, type and size.

Get File List reads the content of a folder on your SFTP or FTP server and returns one entry per file or folder. Use it to find out what is waiting on the server, then pass the list to Download Bulk, Move Bulk or Delete Bulk, or loop over it with a For Each.

Before you start

The action connects through an FTP credential that you create once in the Credential Manager (host, port, protocol FTP or SFTP, an optional Directory path, and a user name with a password or a key file). See FTP Credential.

Add the action

In the Process Designer toolbox, open SFTP and pick Get File List (or type Get File List in the search box).

The Get File List action properties: Select SFTP credentials, Folder Path, Is it Recursive?, File Type, MaxFileNumber and Output

Inputs and outputs

FieldDirectionTypeRequiredWhat to put / what you get
Select SFTP credentialsInputFTP credentialYesThe credential of the server to read.
Folder PathInputTextNoThe folder to list, relative to the credential's Directory path. Leave empty to list the root folder.
Is it Recursive?InputOptionNoTrue also lists the content of every subfolder. False (default) lists only the folder itself.
File TypeInputOptionYesFiles, Folders, or Files and Folders.
MaxFileNumberInputIntegerYesThe maximum number of entries to read.
OutputOutputList of SFTPFilesInformationYesOne entry per file or folder found.

Each entry of Output uses the SFTPFilesInformation data model:

FieldMeaning
nameThe file or folder name, for example invoice-001.pdf.
pathThe full path of the entry on the server.
typeWhether the entry is a file or a folder.
sizeThe size in kilobytes, rounded up (a 9-byte file shows 1).

Map Output to a process variable of type SFTPFilesInformation, with Is list switched on.

Example

With Folder Path inbox, Is it Recursive? False, File Type Files and MaxFileNumber 100, Output holds one entry for each file directly inside inbox, for example an entry with name invoice-001.pdf and path ending in /inbox/invoice-001.pdf.

Good to know

  • Paths are relative to the Directory path set in the credential. If the credential points to /home/data, a Folder Path of inbox reads /home/data/inbox. Don't repeat the credential's Directory path in the field.
  • Server paths are case-sensitive on most SFTP servers: Inbox and inbox are different folders.
  • If the server can't be reached or the folder can't be read, the step fails with "Error while trying to list the files within folder". Connect the step's error route to handle it.
  • The list is the input that the bulk actions expect, so you can filter it (for example with a list filter action) before you pass it on.

On this page