Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Grabbing html text with @line

Oct
29
0
Trying to grab a line from an html file using @line but the < and/or > characters on the line seem to be causing the function to fail.

Example:

[C:\Users\dawolfe\Desktop]echo %@line[0,test1.txt]
TCC: (Sys) The parameter is incorrect.
"%@line[0,test1.txt]"

First line of the file contains:

<sdfgsdfgsdw4>

Is there a way of making this work?
 
Last edited:
Trying to grab a line from an html file using @line but the < and/or > characters on the line seem to be causing the function to fail.

Example:

[C:\Users\dawolfe\Desktop]echo %@line[0,test1.txt]
TCC: (Sys) The parameter is incorrect.
"%@line[0,test1.txt]"

First line of the file contains:

<sdfgsdfgsdw4>

Is there a way of making this work?
The correct syntax is @line[test1.txt,0] (the filename first). But that will also fail because of the redirection symbols (<,>).

You could
Code:
v:\> setdos /x-6 & echo %@line[test1.txt,0] & setdos /x+6
<sdfgsdfgsdw4>

That specifically targets the redirection characters. I suspect that other difficulties would arise in HTML files (like %, for example).
 

Similar threads

Back
Top