Subdirectory Loop

The Subdirectory loop task allows you to monitor subdirectories within a Directory.  For every subdirectory that satisfies the criteria, the Subdirectory loop task will run another task. This other task can be a processing task that works on the current subdirectory.  See the example at the end of this help file on how to use this task.

The Directory Loop task sets various variables for use in the other tasks like:
CurrentSubdirectoryName, CurrentSubdirectoryPath

Directory
Enter the directory where your files are located.

Subdirectory name filter
Enter the Subdirectory name filter for the files you wish to copy  using the following wildcard rules. This field also supports dynamic variables.  Using dynamic variables, you can select a file based on current date/time.

Task To Run
Select the desired task to run, if any of the selected criteria are met.  If you want to use this task in a chain for conditional processing, select 'None'.  You can also select multiple tasks to run in sequence, or to run simultaneously. To run tasks in sequence, use taskTitle1|taskTitle2|taskTitle3. To run tasks simultaneously, use taskTitle1&taskTitle2&taskTitle3.

Maximum loops
This is the maximum number of files that will be processed in each run.  If 100 files pass the criteria, you can process the first 5 files in the list.  Enter 0 to process all files that pass the criteria.

Delay between loops
You should enter a delay time between loops.  The delay must be long enough to ensure the processing task is completed before the next instance of the processing task is called. 

Options
The Task will be run, if the selected criteria is satisfied.  You can select 1 criteria.
1)  Subdirectories hich satisfy the Filename criteria exists
2)  Subdirectories which satisfy the total file size criteria.  The file size is entered in kb, but you can specify 0.001 to 1000000 kb.
3)  Subdirectories which satisfy the date modification criteria.

Example
Create the following 2 tasks:

1) Echo task
Task Title = echoTest
message = The current filename is $%loop::CurrentSubdirectoryName%$

2) Directory Loop
Task Title = loop
directory = [temp or test directory]
Subdirectory name filter =
Maximum loops = 5
Delay = 15
Task To Run = echoTest
Criteria = Run Task if Subdirectories exists

Run the Subdirectory Loop task.  The Subdirectory loop task will run the Echo task for the first 5 subdirectories in the directory.

In real situations, you would use either a copy task or a delete task etc.. For the local directory field in these tasks, use:
$%loop::CurrentSubdirectoryPath%$