load a txt file and break up a string
Posted: 15 May 2021 13:38
Hi,
I have a txt file containing a lot of information about clients and their room numbers formatted like this [NAME:ROOM-NUMBER] so the name and the room number is broken up by a colon. is there a way to display this in 2 different variables? so for example:
Data.txt
What the batch file displays:
And if this is achievable is there a way to mark what has already been displayed? so if jonson's information was showed in the txt file next to jonson it would put a simple - then the next time it would read it would skip jonson and go to the next one, so every time the txt file is read it would show a different person's information.
Thanks Rasil!
I have a txt file containing a lot of information about clients and their room numbers formatted like this [NAME:ROOM-NUMBER] so the name and the room number is broken up by a colon. is there a way to display this in 2 different variables? so for example:
Data.txt
Code: Select all
jonson:138
Massison:124
Elias:125
Ruby:118
What the batch file displays:
Code: Select all
Name: jonson
Room number: 138
Thanks Rasil!