'Blueprism get all files contained in a root folder

I have a root folder with multiple sub folders and those sub folders could have more sub folders and so on and so forth. I want to run an action and pass it the base folder and get all files that are contained in there (Even in sub folders). The Get files action only gets the files at the first level and to use get folders you'd need to create a huge process which checks every level to see if there are more sub folders and you could potentially miss some files.



Solution 1:[1]

run the command through command prompt maybe and then pipe your results out to read them? something like

dir /s /b /o:gn

Gives you all sub files etc in a root directory you can use that to pipe your answer into something readable or stdout it direct into a variable in your code if you can.

Solution 2:[2]

Zip Parent folder by using 7z commands or simply by Blueprism Zip Folder action and Use 7z Commands to extract recursive and relocate to single outputpath folder.

7zip tool is free of cost and usually every other organisation has these Tools.

Use recursive commands (X) of extraction and set the output path to a single location. 7z will do all the recursive fetching.

https://7ziphelp.com/7zip-command-line

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dexter Whelan
Solution 2 Mukesh Kumar