How to collect file names of 3 folders(say A, B C) from a main folder 'Sample'?

Hi All,

I’m able to fetch file names from each folder separately and store in excel sheet. But I want to fetch All the 3 folders respective file names into one excel sheet separated by column name.
So I’ve used “For Each File in Folder” activity.
But I’m facing error as shown below.


Please correct me where I was wrong.
Thanks in Advance:-)

Hi,

Probably, it should be as the following.

filePath = file.FullName

FullName property returns full path of the file.

Regards,