Looping Through Sub-Folders

Is there an easy way to loop through a directory of subfolders and do the same thing inside each subfolder? The activities inside each subfolder would include reading PDFs and producing outputs.

If not in UiPath, is there a simple script I could use or write in another place? Does anyone have any suggestions? Thanks

Simplest way of doing it by using
Directory.GetFiles(“directory”,“*.pdf”,SearchOption.AllDirectories)

1 Like

What would this return to me?

Array of string.
With all pdf files are stored in this particular directory or sub directory.

2 Likes