Skip to content

SFTP List Files

List files and directories on an SFTP server. Returns metadata for each entry including name, size, modification date, and permissions.

Requires an SFTP connection.

Configuration

FieldDescriptionNotes
SFTP ConnectionThe SFTP connection to useRequired. Select from your configured SFTP connections.
DirectoryThe remote directory to listSupports templates. A directory browser is provided. Defaults to the connection's root directory.
File PatternA glob pattern to filter results by filenameSupports templates. Examples: *.csv, report_*, data-202?-*. Only applies to files, not directories.
Include DirectoriesWhether to include directories in the resultsDisabled by default.
Recursive ListingList files in subdirectories as wellDisabled by default. When enabled, traverses up to 50 levels deep.

Input

The node accepts an optional directory input. If the Directory field is left empty, the node will try to use a directory path from upstream data.

Output

The node outputs an object with the following fields:

FieldDescription
filesArray of file/directory entries (see below)
total_countTotal number of entries returned
directoryThe directory that was listed

Each entry in the files array contains:

FieldExampleDescription
namereport.csvFile or directory name
pathuploads/report.csvFull path relative to the connection root
size24576File size in bytes
modified2026-03-16T10:30:00ZLast modified timestamp (UTC, ISO 8601)
is_dirfalseWhether the entry is a directory
permissions-rw-r--r--Unix-style permission string

TIP

Combine SFTP List Files with an SFTP Stream Read node to process all files matching a pattern. The list output provides the path field that can be passed directly to the reader.

INFO

The File Pattern field uses standard glob syntax. Use * to match any sequence of characters and ? to match a single character. For example, data_*.csv matches data_2026.csv and data_march.csv.