Workspace 6.21.5
FileIterator

Similar to the CountedLoop operation, this operation repeatedly executes a set of downstream operations (also known as the "loop body"). 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 on each iteration. NOTE: The FileIterator operation will not execute unless there is at least one operation connected to its Current file name output, and at least one downstream operation connected to its Iteration dependency input.

  • Default label: "File iterator"
  • Member of plug-in: Built-in
  • Catalogue path: Builtin/Loops
Inputs:
Enable loopbool

DirectoryQString

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::FileIterator::OutputFormatControls the format of the output string for each file.
FilterCSIRO::DataExecution::FileFilterFilters the file list based on attributes of the files.
Sorting optionsCSIRO::DataExecution::FileSortFlagsControls the order that files are processed. Note that "natural sort" will order items in their natural alphabetic order; not in ASCII order.
Iteration dependencyCSIRO::DataExecution::Dependency

Special dependency input that marks the end of the loop body. The dependency output of the last operation in the loop body must be connected to this input.

Outputs:
Current file nameQString