tetradelta
Member
- Joined
- Jan 29, 2013
- Messages
- 8
- Programming Experience
- 5-10
Hi,
I have a text file that looks like the following:
CARTRIDGE1
CARTRIDGE2
CARTRIDGE3
etc..
I need to be able to read the last line of the file as well as grab the number to use for a counter.
So for instance, CATRIDGE3 would be the last line, then I need to add 3+1 to make the next entry 4.
Can someone give me a bit of help on how to grab the last line and isolate the number? Thanks!
I have a text file that looks like the following:
CARTRIDGE1
CARTRIDGE2
CARTRIDGE3
etc..
I need to be able to read the last line of the file as well as grab the number to use for a counter.
So for instance, CATRIDGE3 would be the last line, then I need to add 3+1 to make the next entry 4.
Can someone give me a bit of help on how to grab the last line and isolate the number? Thanks!