FTP - For each directory item
FTP - For each directory item
Runs a loop over each item of an FTP directory listed by the FTP: List directory action, returning the current item on every iteration. Ideal for processing files in batch — downloading, moving or renaming each item of the directory automatically.
Options
List
Select the FTP: List directory action whose items will be gone through.
Returns
Custom code
js
actions["action-id"].currentItemIndex // index of the current item in the loop (Number)
actions["action-id"].currentItem // current item of the loop (Any)
Field selection
- currentItemIndex — position of the current item in the iteration (Number)
- currentItem — current directory item being processed (Any)
Rules and Conditions
- The List field is required.
- The actions inside the loop run once for every item of the directory.
- To read the details of the current item (name, size, type, date), use FTP: Get directory item referencing this loop.