Folder Scan Task

The Folder Scan Task scans any folder and returns : - on the yellow port of the task any filtered files. - any growing or locked files on the orange port of the task

Main tab

We need to set some parameters in this tab of the task.

main

Input folder
On this parameter, we set the name or the path of the folder to scan.

Iterate for each link
Instead of triggering all linked tasks for one iteration, this parameter will trigger one iteration for any linked task. Each task will receive a unique loop_index, and a new iteration will be triggered as soon as a previous one is terminated.

Iterate SmartPath as
When scanning folder, a smartPath for the current file will be created inside context. The value of the parameter 'Iterate SmartPath as' becomes the name of the smartPath created.

Sort by
This parameter allows to sort out iterated files by file name, full path, last updated and size using ascendant or descendant method.

Max running

Max running define the maximum iterations running simultaneously by folder. When it is greater than one, this task will trigger a batch of n iterations and wait for termination of the first one before triggering another one.

Batch size
If Batch size greater than one, each loop_value will be a subset of n elements of the founded files list. Each element will contain file_path, file_name and rel_path. For more information and example, see for each > Batch size.

File filters tab

To limit dealing with non-valuable files, we can filter the folder by file name or file size.

scan

by File name
The single or list of file name set in this parameter includes or excludes them on the iterated files.

by File size
Files can also be filtered base on its size (Min and Max).

Scan tab

scan

Keep scanning
It Keeps scanning the folder for new incoming files as long as the condition value is True. Otherwise, if the value of keep scanning is a number(seconds), the folder will to be scanning while the lifetime is not reached.
In the case of the condition is set to False, a single scan of the folder will be executed. While the task is alive, a cache of scanned files will be kept in memory to avoid repetitive iteration of the same files. When a new instance of this task is created, files cache is cleared.

Sleep
Number of seconds before the task will be suspended after each complete folder scan.

wait for growing file
Files size can be different from one another and then the time for them to be scanned will be also be different. In fact, the more the file size is big the more the time for them to scanned is big. checking this box means the folder wait until all file are scanned.

growing_file

Deep Scan
If checked, deep scan will scan any files in input folder and all its sub folders. If not checked, only the first level of the input folder is scanned.

Persistent scan

Persistent scan allows in each new scan of the folder to return only previously un-scanned files. In addition, persistent scan is used in conjunction with a scheduler. Indeed, it determines which file has been processed various instances inside the same scheduler and retrieve all scanned files at green port.
The outputs of this task are not only stored in context of the task. In fact, the list of persistent files or deleted persistent files will be found on its scheduler, and we have the possibility of filtering files or deleting files.

persistent_file