# Save last line into variable

**URL:** https://www.finalbuilder.com/forums/t/save-last-line-into-variable/4445
**Category:** Discussion
**Created:** [July 27, 2010, 3:11am UTC](https://www.finalbuilder.com/forums/t/save-last-line-into-variable/4445 "2010-07-27T03:11:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jeegs](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/b19c9b/32.png) [@jeegs](https://www.finalbuilder.com/forums/u/jeegs)
#### Post date: [July 27, 2010, 3:11am UTC](https://www.finalbuilder.com/forums/t/save-last-line-into-variable/4445/1 "2010-07-27T03:11:41Z")

</div>

### Hello everybody,

### I am working on a project for read text files and remove headers, footers and also, save footers and use as a folder name.Now my question is "How can I get the last line from the text file(as a footers) and save into the variable?"

### I can search the footers but can't save the value into variable.

### Anyone have an idea how to do this?

### Thanks for your help.

### _ **Jeegs** _

### &nbsp;

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [July 28, 2010, 12:38pm UTC](https://www.finalbuilder.com/forums/t/save-last-line-into-variable/4445/2 "2010-07-28T12:38:34Z")

</div>

Hi Jeegs,

I've attached an example project which extracts the last line of a text file.

Regards,  
Paul.  
&nbsp;

[GetLastLine.atz3](https://www.finalbuilder.com/forums/uploads/default/original/2X/c/c449578c23c22a4bebcb9b0a66fa4b19fc4af9e6.atz3) (1.853 KB)

---

<div class="post-metadata">

### Author: ![jeegs](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/b19c9b/32.png) [@jeegs](https://www.finalbuilder.com/forums/u/jeegs)
#### Post date: [July 28, 2010, 4:03am UTC](https://www.finalbuilder.com/forums/t/save-last-line-into-variable/4445/3 "2010-07-28T04:03:17Z")

</div>

Hi Paul,   
  
 Thanks for the script. That works … appreciate your help.   
  
 Regards,   
 Jeegs.
