I am a newbie to UI Path and need some advice on how to extract the data from a specific position in the file…
I have multiple files in a folder and I am currently moving the file from one folder to another but before moving the file, I need to do few actions like
The first line always starts with ISA and 9th postion to be replaced with "Test " and 16th to be replaced from “P” to “T” and second line always starts with GS and 4th position to be update to “Test”
Hi, welcome to the community!
If those things really have fixed positions and length, then it will be easy to replace, using string manipulation: YourString.Remove(IndexToStartRemove, NumberOfCharToRemove)
to put in the replacement text: YourString.Insert(IndexToStartRemove, "New Text")
I am trying to replace the 102 char position from “P” to “T” but unfortunately its replacing all occurrences of “P” to “T” in the whole file, irrespective of the psotion.
Exp I used: newlogdata.Replace(newlogdata.ElementAt(102),“T”)
My aim is to replace only 102 character in the file from “P” to “T”.
if you use what i explained above, it will work… i dont think there is a way to do all in one expression, you need to delete the 102th chat first and insert the new one after in the same position…