somas1218
(somas1218)
January 4, 2018, 10:48am
1
database:TEST
path:“C:\Users\soma.ponnuru\Documents\UiPath”
I have a data like that in a text file and by reading the text file it should split based on colon delimiter.
I want the output ““C:\Users\soma.ponnuru\Documents\UiPath”” to be stored in a variable.
please help me.
prassin6
(Prashant Singh)
January 4, 2018, 11:08am
2
Hi @somas1218 ,
In that case try this
1.> Store the String “C:\Users\soma.ponnuru\Documents\UiPath” in a variable. for example - Test_String
2.> Use Assign Activity and there are two fields
To Part - String_Array Note - String_Array is a variable of type System.String[]
Value part - Test_String.ToString.Split({“:”},StringSplitOptions.None)
Use msg boc activity and type String_Array(0) will display : “C”
and String_Array(1) will display " \Users\soma.ponnuru\Documents\UiPath "
somas1218
(somas1218)
January 4, 2018, 11:19am
4
Thanks for the reply.
database:TEST
path:“C:\Users\soma.ponnuru\Documents\UiPath”
My problem is Thae above lines are present in text file.I’m reading the file using read text file.
From that text file i want to get the output as “C:\Users\soma.ponnuru\Documents\UiPath”
rahamtullah
(Mohammed Rahamtullah)
January 4, 2018, 11:30am
5
Hi,
Try to split output of text file using “path:”.
Assign a variable with value of the first index of array output. ex: arrayData(1)
Regards,
Rahamat