Skip to main content
SFTP

SFTP - List directory

SFTP - List directory

Lists every file and folder in a directory of the SFTP server, returning the collection of items found. Ideal for checking a directory's content before downloading files, processing items in batch or checking whether certain files exist.


Options

Connection

Select the SFTP: Connect action that will be used to reach the server.

Path

Enter the path of the directory to list on the SFTP server. Use a single slash (/) for the root directory.

Returns

Custom code

js
actions["action-id"].items // list of items found in the directory (List)
actions["action-id"].count // number of items found (Number)

Field selection

  • items — list of items (files and folders) found in the directory (List)
  • count — total number of items found (Number)

Rules and Conditions