Computing.Net > Forums > Disk Operating System > Parse string in Win9x DOS

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Parse string in Win9x DOS

Reply to Message Icon

Name: trojmn
Date: May 20, 2004 at 08:42:01 Pacific
OS: DOS, all Windows
CPU/Ram: 686
Comment:

How do you parse 2.2 for later comparison from this output in WIN9x DOS?

W32i APP - 2.2.102.0 shp extra.exe

For NT dos I redirected that output to a temp file (ver.tmp) and used FOR /F

For /F "tokens=4,5 delims=. " %%v in (%temp%ver.tmp) do SET VER=%%v.%%w

Any help would be appreciated.




Sponsored Link
Ads by Google

Response Number 1
Name: flimflam
Date: May 20, 2004 at 09:03:29 Pacific
Reply:

What is NT DOS? NT has CMD.exe which is not and never will be MSDOS.

Batch files for MSDOS and MSDOS Based Windows are different to Windows NT Batch Files.

Therefore a more specific Operating System may be helpful to the responders who may try to help, or try the PROGRAMMING FORUM ?


0

Response Number 2
Name: jboy
Date: May 20, 2004 at 10:03:53 Pacific
Reply:

Sure - you're asking what the DOS equivalent of an NT batch instruction, in relation to some Win32 application

FOR...IN...DO IS a batch instructon in MS-DOS but the NT version likely functions differently, and in a different environment.

DOS is not in "all Windows"

Programming might be a better choice for your question


Bleat at me no longer.


0

Response Number 3
Name: trojmn
Date: May 20, 2004 at 10:49:34 Pacific
Reply:

I thought it was implied that what i wanted to was *NOT* in the NT shell....incorrectly refered to me as "NT DOS" I thought it might be benificial to have a working expample of what i wanted to accomplish. Sorry for the confusion.

The basic FOR IN DO functionality excluding the NT extensions (i.e. /F /N) would be gernerally correct across most all MSDOS platforms, ports, shells, whatever from 6.22 up(earlier even?).

Specifically I stated "How do you parse 2.2 for later comparison from this output in WIN9x DOS? "
The basic idea of the post is how do you parse said output string into variables for comparision?


0

Response Number 4
Name: jboy
Date: May 20, 2004 at 11:09:32 Pacific
Reply:

And again, that's a bit too esoteric for general DOS help - it really is more of a programming question.

"How do you parse 2.2" does not make a whole lot of sense to me - but perhaps that's due to my imperfect understanding of the finer points of DOS(?)

Maybe you'll luck out here and someone will be able to provide you with a more substantive answer (I'm just doubtful).

Bleat at me no longer.


0

Response Number 5
Name: trojmn
Date: May 21, 2004 at 11:28:18 Pacific
Reply:

Where there is will there is another way. Once I stopped being hung up on setting a variable, I realized that I aleady know what value I am looking for so for reference sake the answer is... To find known value "[x]" in [yourfile] use the find command and check the errorlevel!

type %temp%.\[yourfile]|find "[x]">NUL
if "%errorlevel%"=="0" GOTO [modual name]


0

Related Posts

See More



Response Number 6
Name: jboy
Date: May 21, 2004 at 13:16:54 Pacific
Reply:

Ok - glad you found a solution (on your own, no less)

Maybe it'll help someone else facing a similar challenge.


Bleat at me no longer.


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Parse string in Win9x DOS

DOS Printer options, setup strings www.computing.net/answers/dos/dos-printer-options-setup-strings/10885.html

Replace a string in regedit on start www.computing.net/answers/dos/replace-a-string-in-regedit-on-start/8299.html

copying in dos with batch file www.computing.net/answers/dos/copying-in-dos-with-batch-file/15285.html