Loop Files

How will you loop over files in a directory?

@Sana_Afreen,

ExcelFileNamesToExcel.xaml (10.0 KB)

Check this xaml, It will help you to understand the looping of files in a directory.

Hi

with a expression like this
arr_files = Directory.Getfiles(“yourfolderpath”)
where arr_files is a variable of type array of string
–now use a FOR EACH activity and pass the above variable as input to the loop and change the type argument as string in the property panel of FOR EACH loop
–inside the loop we can use item.ToString which has the file path of each file in that folder

Cheers @Sana_Afreen

2 Likes