Skip to main content
Roberty Studio
RPAFTP

FTP - Get directory item

FTP - Get directory item

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


Options​

List or loop​

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

List index​

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

Returns​

Javascript code​

js
actions["action-id"].isDirectory // whether the item is a folder (Boolean)
actions["action-id"].isFile // whether the item is a file (Boolean)
actions["action-id"].name // name of the file or folder (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 (Boolean)
  • isFile — whether the item is a file (Boolean)
  • name — item name (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 FTP: For each directory item loop, the position is set automatically by the current iteration.