How to get the a string from file which is delimited by hex value x'DE' ?

How to get the a string from file which is delimited by hex value x'DE' ?

Post by halv » Tue, 29 Dec 2009 19:34:32


Assume I have a (text) file with only one line.
Now I want to get the string from the beginning of this first line until a delimiter which
is equal to the hexadecimal value DE ?

This string should be assigned to a variable "mystring" in my DOS batch program (under WinXP).

How can I achieve this?

Dennis
 
 
 

How to get the a string from file which is delimited by hex value x'DE' ?

Post by ak62 » Thu, 31 Dec 2009 01:31:37


*** I can't help with XP, but DOS users employing XSET can:

TYPE FILE.TXT | XSET /SEPARATOR "DE" /WORD 1 mystring


Substitute the character represented by hexadecimal `DE' and this
should work.

--
Richard Bonner
http://www.yqcomputer.com/ ~ak621/DOS/