I haven't done this in years and forgot the way to do it. Its not really vb but I was hopeing someone could remember how its done.
I create a file lets call it count.txt in it its got 25 lines of whatever.
I can read the file using this command.
for /f %%X in (count.txt) do echo %%X
what I need to do is have the file read and say at line 10 pull that out set it as %%X and do something with that line then end.
So say its reading the file gets to line 10 pulls the line which is hello. then do print %%X and end. I would see Hello
Or if I said in my if statement its at line 20 which said goodbye once it got to line 20 it would do something then end.
The question is how to setup a loop to do something with a line number I set do something then end.
I create a file lets call it count.txt in it its got 25 lines of whatever.
I can read the file using this command.
for /f %%X in (count.txt) do echo %%X
what I need to do is have the file read and say at line 10 pull that out set it as %%X and do something with that line then end.
So say its reading the file gets to line 10 pulls the line which is hello. then do print %%X and end. I would see Hello
Or if I said in my if statement its at line 20 which said goodbye once it got to line 20 it would do something then end.
The question is how to setup a loop to do something with a line number I set do something then end.