How to looping and filter all files excel in Directory


i write rpa success for 1 files but not success all files in directory
i don’t know how to looping and filter all files in Direcoty

Please help me
Thany you every comment and guide me :slight_smile:

Hi @alicezona ,

Please one assign activity and assign to one String array variable right side value should be Directory.GetFiles(“YourFolderPath”,’’*.xlsx") it would help us to get all the excel file names and path stored into the string array variable. if you want to retrieve text files change the filter condition to *.txt

then use for each activity assign your string array variable in the In section and change the Type argument to string. and you can have file name and properties in the item.


There is another activity in the studio → For each file in folder
you have to provide path and filter condition also in the below section by using CurrentFIle object we can retrieve the name, path and other properties of the file.