set var from a text file in dos

September 28, 2009 at 04:05:06
Specs: Windows XP
text file contains

SPINSER_CAT5 <00> UNIQUE Registered

(first 4 chars are spaces on each line)

How would I go about extracting the first word ( in this example SPINSER_CAT5 )
And setting it as a variable in a dos batch file ?

thanks for looking at this

See More: set var from a text file in dos

Report •

September 28, 2009 at 04:17:32
It's either DOS or XP. Not a little of each.

Report •

September 28, 2009 at 05:26:48
Probably you are running under Windows XP and what you need is a NT batch file as there is no plain DOS in NT based systems.

The script is you want is quite easy but explain better the structure of the text file, i.e does it hold just two lines or how to catch the one holding the word to be extrcted?

Report •

Related Solutions

Ask Question