Skip to main content
SFTP

SFTP - Get directory item

SFTP - Get directory item

Gets the details of a specific item of an SFTP directory — name, path, size, type and modification date. It can be used either inside a SFTP: For each directory item loop or by referencing a specific position in a list obtained through SFTP: List directory.


Options

List or loop

Select the SFTP: List directory or SFTP: For each directory item action that references the item to read.

List position

Enter the index of the item in the list you want to reach. The count starts at zero. This field is shown only when the source is a static listing — inside a loop, the position is set automatically.

Returns

Custom code

js
actions["action-id"].isDirectory // whether the item is a folder (Yes/No)
actions["action-id"].isFile // whether the item is a file (Yes/No)
actions["action-id"].name // name of the file or folder (Text)
actions["action-id"].path // full path of the item on the server (Text)
actions["action-id"].size // size in bytes (Number)
actions["action-id"].date // date of the last change (Date)

Field selection

  • isDirectory — whether the item is a directory (Yes/No)
  • isFile — whether the item is a file (Yes/No)
  • name — item name (Text)
  • path — full path of the item on the SFTP server (Text)
  • size — size in bytes (Number)
  • date — date of the last change (Date)

Rules and Conditions

  • The List or loop field is required.
  • When used inside a SFTP: For each directory item loop, the position is set automatically by the current iteration.
  • The List position field is only shown when the selected source is a SFTP: List directory action.