Traversing all directories and Download files (DFS)

Hi there,
I am trying to traverse all directories (Depth first search)
When it encounters the leaf folder, It should download all files in the folder.
And repeats till all folders are visited.

Can it be implemented by UI Path?
I know we can use stack data structure to do it.
But I am not sure how to use it.
Please help me!! slight_smile:

thx in advance.


We can achieve it using recursive calling as the following,
Hope this helps you.

img20210507-3 (5.1 KB)


Thank you bro,
I will try it!