Get Files/Folders List
This activity gets a list of files from a specified folder. This activity is meant to be used in scenario when you need a robot to process a package of files in a loop.
You can use use wildcards: ? to replace any character, an asterisk (*) to replace any sequence of characters, so pattern “*.txt” finds all text documents in a given folder, “bb*” find all files that name starts with double “b”. When you leave Search pattern field empty - it finds all documents in a given folder.
Using this activity you can also get a list of subfolders in a specified folder (tick the box Folders in Properties window).
When there are no files/subfolders matching pattern, activity returns an array of length 0.
Acquired Text | String | Output | text input by user |
---|---|---|---|
Alternative Scenario If Failed | Boolean | Input | checkbox; default is "on" |
Display Name | Literal | Input | changes display name of the activity |
Exclude from Transaction Check | Boolean | Input | checkbox; default is "off" |
Folder Path | String | Input | directory path to a folder |
Search for folders | Boolean | Input | checkbox; default is "off" |
Search Pattern | String | Input | string to match |
Files/Folders List | String[] | Output | variable that will store the list of files |
Result | Boolean | Output | returns a Boolean value. True if no error in activity, otherwise will return False |
Result Code | Int32 | Output | Result Code will return 0 if there is no error in activity, otherwise in most cases will return 1. See the table of Extended Result Codes for more info |