Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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.

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 ?

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.

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?

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.

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]

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.

![]() |
![]() |
![]() |

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