Read contents,performs iterations in a file and giving dynamic input

automation-studio
#1

1.How to read the contents from “Word” & “text” files and store it in a VB variable for processing.?
2.How to iterate through a list of files in a folder(Similar to foreach loop) other than “Excel loop” for Word and txt files?
3.How to give dynamic input after triggering evabot?Eg:Giving folder and file name before evabot have started outside automation studio.

#2

Hi Viknesh,

For,
Point # 2:
You can add a File search operation and provide folder path, search pattern( *.txt / *.docx) adn ouuput excel path. This will generate a excel which will contain list of files matching the pattern provided.
FileSrch

Then after you can use excel loop to iterate through the FilePath column and do your desired action on each of the file

#3

Hi Viknesh,

For Point # 3,
Once automation is triggered via eva bot then there is no way to give manual input in between.

#4

Hi Viknesh,

For Point # 1;

In order to read from a text file and store in a argument you can create a out argument of type String and a in argument for File path. You can then add a Assign activity and assign

stringReader value Microsoft.VisualBasic.FileIO.FileSystem.ReadAllText(FilePath)
Entire text of file will come in argument stringReader

FileRead