Getting the list of files (.txt) from a directory and iterating in the for loop to use “Read Text File”. But it’s errorring out.
for each item in Directory.GetFiles(path)
String file = new FileInfo(item.toString).fullName
Now use “Read Text File” activity - file to a String object.
But getting error in this “Read Text File” activity.
Researched from the below post that the filename was containing double slashes. So, tried replacing the string with “/”. Still no luck.
Hi, assign files(array of string)=
Directory.GetFiles(“yourfolderpath”,”*.txt”)
Now use a for each loop on the files variable with type argument as string. Your item variable shoyld contain the full file path and can be used ib read text file activity.