Skip to content

SFTP List Directory

Type: sftp-list  ·  Package: SFTP Activities v1.0.0  ·  Output: List

Lists files and folders in a remote path. It is the basis of the processes that collect files: seeing what is available on the server to download and process.

Lists the contents of remotePath, optionally filtered by pattern. Returns a list of elements, each with its data (name, full path, size, if it is a folder, date).

ParameterEditorDescription
remotePathexpressionRemote folder to list.
ParameterEditorDescription
sessionsessionSFTP Connect session. Within a body it is inherited.
patternexpressionFilter pattern, e.g. *.csv. By default * (all).

Returns a List of elements. Each one has: name, fullName, size, isDirectory, lastWriteTime.

SFTP List Directory remotePath = "/salida" pattern = "*.csv" → output: archivos
Log message = = "Archivos disponibles: " + count(archivos)
For Each items = = archivos itemVariable = item
└─ activities:
SFTP Download remotePath = = item["fullName"] localPath = = pathJoin("C:/descargas", item["name"])