I'm not sure if this is possible, but is there a way for a batch file to read a text file, but skip lines that do not start with a number?
For example:
handled
219278
check
219276
control
219274
co
219268
Can a for loop skip handled, check, control, etc.?
I know this:
cscript C:\Users\c1921\Test\curltest.vbs"!$MyVar!">>C:\Users\c1921\Test\Datapoints\!$MyVar!.txt
Will put all output to this text file but this:
FOR /F %%i in (C:\Users\c1921\Test\Datapoints\!$MyVar!.txt) DO (
set "$UnitID=%%i"
)
Reads every line into a variable. Can I somehow use delims and tokens to only get the numbers?
Edit:
I thought this might be possible going off of an answer on this question: Windows Batch file to echo a specific line number
The file I have on occassion might not have a number between the words for example:
handled
check
219276
control
219274
co
219268
This should not happen often, but I'd like to make sure I can avoid this when it does.