In this post, we will get all the files present in a folder and print their path on the output panel. First, we will store the files in an array of string and then we iterate through the array.
Add a new assign activity. Create a new variable by pressing
Cntrl+K. Name the variable
listOfFiles. Give the value of variable as below –
Directory.GetFiles("<Your Folder Path>")
You will notice an error because we need to change the variable type to
System.String. Open the variables panel and change the type.
For Each activity and iterate through the list of files and print their path on the console using the
Writeline activity. You will have to change the item/file to string in order to print.
Your complete flow looks like this.
Run the process and check the output.
Thank you All!!! Hope you find this useful.
If you liked our content and it was helpful, you can buy us a coffee or a pizza. Thank you so much.