Divides files evenly from a folder in to N folders in an array.
Version | 1.1 |
---|---|
Bundle | tools |
Categories | Preprocessing |
Authors | Ville Rantanen (ville.rantanen@helsinki.fi) |
Issue tracker | View/Report issues |
Requires | python |
Source files | component.xml foldersplitter.py |
Usage | Example with default values |
Name | Type | Mandatory | Description |
---|---|---|---|
in | BinaryFolder | Mandatory | input folder |
Name | Type | Description |
---|---|---|
out | Array<BinaryFolder> | output folder array. |
Name | Type | Default | Description |
---|---|---|---|
N | int | 2 | Divide files into N folders. |
link | boolean | false | When true, do not copy files, but create symbolic links pointing to the sources. WARNING: You may potentially break the execution of downstream components, if @keep=false is used. |
order | string | "sparse" | 'sparse': output port changes for every consecutive array item. 'sequence': first output is filled first, then move on to second. 'random': random by seed parameter. Array keys are enumerated 1,2.. 'regexp': splits folder by unique matches by regular expression. Array keys are the matches. |
regexp | string | "(.*)" | Regular expression for splitting in regex order. Files not matching to expression are skipped. |
seed | int | 1970 | Seed for random shuffling. |
Test case | Parameters▼ | IN in |
OUT out |
|||
---|---|---|---|---|---|---|
case1 | properties | in | out | |||
N=4 |
||||||
case2_random | properties | in | out | |||
N=4, |
||||||
case3_file_order | properties | in | out | |||
N=4, |