Text file operations


I have a text file which I’m iterating using advanced loop with colon as the delimiter. I’m coming across two issues when trying to execute a process:

  1. The text file contains certain strings which I want to extract in the first column. I use the expression
    I want to search this same word but without the search being case sensitive. What should I use instead of ‘.equals’? I tried ‘.contains’ but I don’t get the result.

And where can I find a list of such keywords I can use for str, int etc? I’m not getting the dropdown option when I type ‘tostring.’ inside the advanced loop.

  1. In the same text file, I want to replace certain strings like ‘Sample =’ as ‘Sample :’ since I am using colon as the delimiter. Currently I am doing this manually before running the process. Can anyone suggest how to do this inside AutomationStudio itself?

Thanks for your help



You can use following comparison expression in your if block for ignoring case
(outres.item(0).tostring().Equals(“sample”, StringComparison.InvariantCultureIgnoreCase))

You can implement your use case with following steps and using window based automation
Open File
Press Ctrl+H
Enter the text to find and text to replace
Press Replace all
close the file

Amit Anand

Thanks Amit, I’ll try these solutions.

But could you tell me where I can find a list of these functions/keywords which we can use on strings/ integers etc? Like the ‘stringcomparison.invaraintcultureignorecase’ you used in this expression



These are VB.net expression. You can google for the same

Amit Anand

Ok Amit, I’ll try that. Thanks for the quick reply