|I'm looking to search through a text file for a string. Once I find this string, I want to read the string on the same line, after it. |
Let me explain more...
I have a file called myfile.bat
Within this file is the following line:
I want to return "TheValueIWant"
If there were no space between "SET" and "WAS_NODE" I could easily read it as an ini file. I have the ability to search for and find this line and add a new line before or after it - or even concatenate information on to the end of it. However with all the tricks I do have, I cannot read this value where SET WAS_NODE=TheValueIWant.
Actually, I'll go one step further now. I do not need this done because I can do this part myself once I can return "TheValueIWant", but I actually only NEED "TheValue" I will need to trim n(IWant) characters off the end of the value returned to produce the final result I am looking for.
Many thanks in advance. Please - I do not want to bother anyone so if you do not fully understand the question, please don't waste your time by creating and posting code - just because....