home *** CD-ROM | disk | FTP | other *** search
- echo off
-
- rem This is a demonstration batch by Prof. Timo Salmi Sat 7-Dec-91
-
- rem It shows how to test within a batch files if the MsDos version
- rem is 3.3 or later. The reason for this demonstration is that you
- rem might wish to have differences in your batch depending on which
- rem MsDos version is available. For example the call command was not
- rem available until version 3.3.
-
- rem If none of the 3.3, 4. or .5 is found then tmpfind.$$$ will be
- rem empty.
- ver | find "3.3" > tmpfind.$$$
- ver | find "4." >> tmpfind.$$$
- ver | find "5." >> tmpfind.$$$
-
- rem If tmpfind.$$$ is empty (0 bytes) copying it will produce
- rem nothing.
- copy tmpfind.$$$ tmpfind1.$$$ > nul
- del tmpfind.$$$
-
- rem We tests whether tmpfind1$$$ exitst. This we are indirectly
- rem testing whether 3.3, 4. or .5 was found.
- if exist tmpfind1.$$$ echo MsDos version is at least 3.3
- if not exist tmpfind1.$$$ echo MsDos version is earlier than 3.3
-
- if exist tmpfind1.$$$ del tmpfind1.$$$
- echo on
-