SFTP List Directory
SFTP List Directory
Section titled “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.
How it works
Section titled “How it works”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).
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
remotePath | expression | Remote folder to list. |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
session | session | SFTP Connect session. Within a body it is inherited. |
pattern | expression | Filter pattern, e.g. *.csv. By default * (all). |
Output
Section titled “Output”Returns a List of elements. Each one has: name, fullName, size, isDirectory, lastWriteTime.
Example
Section titled “Example”SFTP List Directory remotePath = "/salida" pattern = "*.csv" → output: archivosLog message = = "Archivos disponibles: " + count(archivos)For Each items = = archivos itemVariable = item └─ activities: SFTP Download remotePath = = item["fullName"] localPath = = pathJoin("C:/descargas", item["name"])Related activities
Section titled “Related activities”- SFTP Download — download each file listed.
- SFTP Exists — check a specific file.