How to find files in folders?

Hi all
How can I get the file names that are in specific folders and subfolders?
and write them to .xlsx

example

C:\Program Files\Intel\Intel® Chipset Device Software\Readme.txt
C:\Program Files\Intel\Media SDK\Readme.txt

Thank you

@Aibek_Abubakirov
Getting the filePaths of the files within a directory
within an assign activity
Leftside: your Variable of Datatype: String Array
Rightside: Directory.GetFiles(YourTargedDirectoryPath)

2 Likes

@Aibek_Abubakirov - You can create your own recursive logic to loop through folders & subfolders to get the list of files using Directory.GetFiles
Or
You can use the below RPA component(pls read component description/guide for easy implementation)

2 Likes

@ppr @GBK how can i get the path to all folders?

Here you are.
Directory.GetFiles(“intput folder path here”, “Readme.txt”, SearchOption.AllDirectories)

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.