1.

Solve : Capture the content of the txt?

Answer»

i would like the capature some letter within the CONTENT of the txt file.
if the content is:ABC,59.
i would like to capture to 5 and 9 it is the 5th and 6 digit as an variable. How can i do this?Quote

@ECHO off
set x=
for /f "usebackq tokens=2 delims=," %%I in ("filename") do (
set x=%%I
)
echo %x%
pause

That will only work if it's not homework.Quote from: cityjack on August 16, 2007, 11:40:43 PM
i would like the capature some letter within the content of the txt file.
if the content is:ABC,59.
i would like to capture to 5 and 9 it is the 5th and 6 digit as an variable. How can i do this?
show an actual SAMPLE of the txt file. also, is ABC always fixed?ABC is not fixed.
the sample:
234,AB

I would like to capture the 5th and 6th digit as parameter.


Discussion

No Comment Found