The For Each File action will iterate through files in a directory. 

For Each File

Name

A friendly name for this action (will be displayed in the actions workflow area).

Enabled

Determines if this action will be run within the relevant stage.

Root Directory

The directory containing the files to be iterated over

File Patterns

A list of file names or patterns to match. Each file/pattern must be entered on a new line. You can specify an exact file with it's path or you can use pattern matching.

You can exclude files by prefixing the file name or pattern with a dash. e.g -*.ignore. Exclude patterns always take precedence over include patterns.

More information about pattern wild cards can be found on the Ant Pattern Usage page

Options

File Path Variable

An existing variable for storing the full path of the current file in the iteration. You can use this variable to access the current file in a child action. 

File Name Variable

An existing variable for storing the name of the current file in the iteration. You can use this variable to access the current file name in a child action. 

Order By

Specify the file property to order the files by when iterating. Select either Default, Created, Modified, Name or Path. By default, the files are ordered as matched by each pattern.

Descending order

Tick to order the files in descending rather than ascending order. 

Log Iteration Text

Select the text (filename or file path) to write to the build log for each iteration.


  • No labels