# Read cpecific values from text file

**URL:** https://www.finalbuilder.com/forums/t/read-cpecific-values-from-text-file/2190
**Category:** Discussion
**Created:** [August 29, 2013, 11:17am UTC](https://www.finalbuilder.com/forums/t/read-cpecific-values-from-text-file/2190 "2013-08-29T11:17:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![efridman](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/e/a88e57/32.png) [@efridman](https://www.finalbuilder.com/forums/u/efridman)
#### Post date: [August 29, 2013, 11:17am UTC](https://www.finalbuilder.com/forums/t/read-cpecific-values-from-text-file/2190/1 "2013-08-29T11:17:55Z")

</div>

Hi

&nbsp;I have a text file with several lines

AAA=1

BBB=5

CCC=3

DDD=4

Now I need to extract the values of BBB and DDD

I tried to use “Read text file” and “List iterator” to process the file but haven’t succeed to identify that current value is what I need

---

<div class="post-metadata">

### Author: ![nevar](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/c4cdca/32.png) [@nevar](https://www.finalbuilder.com/forums/u/nevar)
#### Post date: [August 30, 2013, 1:15am UTC](https://www.finalbuilder.com/forums/t/read-cpecific-values-from-text-file/2190/2 "2013-08-30T01:15:07Z")

</div>

When iterating through the lines of the file I would try the String Pos and String Substring actions. The String Pos action will allow you to locate the index of the “=” in the string. This index should be stored into a variable. The String Substring action allows specification of what substring is to be retrieved out of the current string. In this case I would use the “Specify Position” | “Left”, with a starting position of 0, and a Length of %SavedPosValue%. The %SavedPosValue% comes from the String Pos action.

---

<div class="post-metadata">

### Author: ![efridman](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/e/a88e57/32.png) [@efridman](https://www.finalbuilder.com/forums/u/efridman)
#### Post date: [October 10, 2013, 12:15pm UTC](https://www.finalbuilder.com/forums/t/read-cpecific-values-from-text-file/2190/3 "2013-10-10T12:15:32Z")

</div>

This is what I was doing but I just saw that the output of the exe I’m running have several lines but the last line ( the one I’m interested in ) may contain %,   
 this is why when I tried to use a variable ( like the example you sent me ) in a message box the message box was empty.   
 Is there an easy way using iterator ( although lines may include % ) getting the last line or I will just use a script ?

---

<div class="post-metadata">

### Author: ![efridman](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/e/a88e57/32.png) [@efridman](https://www.finalbuilder.com/forums/u/efridman)
#### Post date: [October 10, 2013, 12:17pm UTC](https://www.finalbuilder.com/forums/t/read-cpecific-values-from-text-file/2190/4 "2013-10-10T12:17:24Z")

</div>

🙂 please ignore my previous message it was in the wrong topic
