Workspace 6.21.5
FileLoop

Similar to the ForLoop operation, this operation repeatedly executes workflow. Rather than executing a fixed number of times, however, this operation executes once for each matching file it finds in a particular directory. This allows the user to conveniently set up loops that process a different file for each iteration. NOTE: The FileLoop operation scans the directory only once prior to commencing iterating. Files added to the directory during execution will not be detected until subsequent executions of the operation.

  • Default label: "File Loop"
  • Member of plug-in: Built-in
  • Catalogue path: Builtin/Loops
Inputs:
Enable loopboolIf true, the loop will execute multiple iterations, based on its control inputs. If false, the loop will execute a single iteration only.
WrapboolIf true, once the loop has completed its final iteration and satisfies its termination condition, it will restart executing from the first iteration again. This can be useful for UI-driven applications where continuous (but repeating) feedback loops are required.
Enable parallel loopingboolIf enabled, the loop will attempt to execute iterations in parallel, making use of multiple cores on the local machine, as well as any remote execution resources specified in the parallel / remote execution configuration in the Workspace settings. For more information about remote / parallel execution in Workspace, please see the parallel / remote tutorials available under the "help" menu.
Current file nameQString

First iteration?CSIRO::DataExecution::Dependency

DirectoryQStringThe directory to scan for files to iterate over.
File patternsArrayQStringIf a file in the target directory matches any of the patterns specified on this input, it will be included in the list of files to iterate over.
Output formatCSIRO::DataExecution::FileLoop::OutputFormatControls the format of the output string for each file.
Directory Iterator FlagsCSIRO::DataExecution::DirIteratorFlagsOptions to iterate through the subdirectories and symbolic links.
FilterCSIRO::DataExecution::FileFilterFilters the file list based on attributes of the files.
SortingCSIRO::DataExecution::FileSortFlags

Controls the order that files are processed. Note that "natural sort" will order items in their natural alphabetic order; not in ASCII order.

Outputs:
DependencyCSIRO::DataExecution::Dependency