@echo off
rem 
rem +-----------------------------------------+
rem !   Port Finder ERRORLEVEL Batch File     !
rem !   Copyright (c) 1990 mcTRONic Systems   !
rem !   revised on: August 4, 1990            !
rem !   File Name: COMMTEST.BAT               !
rem +-----------------------------------------+
rem 
if not exist pf.com goto :error
cls
echo    ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo    º                                                                       º
echo    º  ±±±±Ü  ±±±±Ü  ±±±±Ü  ±±±±±Ü    ±±±±Ü ±±±Ü ±±Ü ±Ü ±±±±Ü  ±±±±Ü ±±±±Ü  º
echo    º  ±Ûß±Û  ±Ûß±Û  ±Ûß±Û   ß±Ûßß    ±Ûßßß  ±Ûß ±Û±Ü±Û ±Ûßß±Ü ±Ûßßß ±Ûß±Û  º
echo    º  ±±±±Û  ±Û ±Û  ±±±Üß    ±Û      ±±±Ü   ±Û  ±Û±Û±Û ±Û  ±Û ±Ûßß  ±±±Üß  º
echo    º  ±Ûßßß  ±±±±Û  ±Ûß±Ü    ±Û      ±Ûßß  ±±±Ü ±Û ±±Û ±±±±Üß ±±±±Ü ±Ûß±Ü  º
echo    º   ß      ßßßß   ß  ß     ß       ß     ßßß  ß  ßß  ßßßß   ßßßß  ß  ß  º
echo    º                                                                       º
echo    º           The Number ONE Shareware COM and LPT Port Utility           º
echo    º                                                                       º
echo    ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¹
echo    º                                                                       º
echo    º   You can use  Port Finder  in a batch file to determine the number   º
echo    º   of COM ports that are installed in any IBM or compatible computer.  º
echo    º   Press any key to see the COM ports installed in your computer.      º
echo    º                                                                       º
echo    ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
pause
cls
pf %1 %2 >nul
echo    ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo    º                                                                       º
echo    º  ±±±±Ü  ±±±±Ü  ±±±±Ü  ±±±±±Ü    ±±±±Ü ±±±Ü ±±Ü ±Ü ±±±±Ü  ±±±±Ü ±±±±Ü  º
echo    º  ±Ûß±Û  ±Ûß±Û  ±Ûß±Û   ß±Ûßß    ±Ûßßß  ±Ûß ±Û±Ü±Û ±Ûßß±Ü ±Ûßßß ±Ûß±Û  º
echo    º  ±±±±Û  ±Û ±Û  ±±±Üß    ±Û      ±±±Ü   ±Û  ±Û±Û±Û ±Û  ±Û ±Ûßß  ±±±Üß  º
echo    º  ±Ûßßß  ±±±±Û  ±Ûß±Ü    ±Û      ±Ûßß  ±±±Ü ±Û ±±Û ±±±±Üß ±±±±Ü ±Ûß±Ü  º
echo    º   ß      ßßßß   ß  ß     ß       ß     ßßß  ß  ßß  ßßßß   ßßßß  ß  ß  º
echo    º                                                                       º
echo    º           The Number ONE Shareware COM and LPT Port Utility           º
echo    º                                                                       º
echo    ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¹
echo    º                                                                       º
if errorlevel 15 goto 15port
if errorlevel 14 goto 14port
if errorlevel 13 goto 13port
if errorlevel 12 goto 12port
if errorlevel 11 goto 11port
if errorlevel 10 goto 10port
if errorlevel 9 goto 9port
if errorlevel 8 goto 8port
if errorlevel 7 goto 7port
if errorlevel 6 goto 6port
if errorlevel 5 goto 5port
if errorlevel 4 goto 4port
if errorlevel 3 goto 3port
if errorlevel 2 goto 2port
if errorlevel 1 goto 1port
if errorlevel 0 goto 0port
:0port
echo    º                         You have no COM ports!                        º
goto endall
:1port
echo    º                          You have COM port 1                          º
goto endall
:2port
echo    º                          You have COM port 2                          º
goto endall
:3port
echo    º                       You have COM ports 1 and 2                      º
goto endall
:4port
echo    º                          You have COM port 3                          º
goto endall
:5port
echo    º                       You have COM ports 1 and 3                      º
goto endall
:6port
echo    º                       You have COM ports 2 and 3                      º
goto endall
:7port
echo    º                     You have COM ports 1, 2, and 3                    º
goto endall
:8port
echo    º                          You have COM port 4                          º
goto endall
:9port
echo    º                       You have COM ports 1 and 4                      º
goto endall
:10port
echo    º                       You have COM ports 2 and 4                      º
goto endall
:11port
echo    º                     You have COM ports 1, 2, and 4                    º
goto endall
:12port
echo    º                       You have COM ports 3 and 4                      º
goto endall
:13port
echo    º                     You have COM ports 1, 3, and 4                    º
goto endall
:14port
echo    º                     You have COM ports 2, 3, and 4                    º
goto endall
:15port
echo    º                    You have COM ports 1, 2, 3, and 4                  º
:endall
echo    º                                                                       º
echo    ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¹
echo    º                                                                       º
echo    º   To see how this batch file works,  enter the following command at   º
echo    º   the DOS prompt "type commtest.bat |more" or to print it out enter   º
echo    º   "type commtest.bat >prn".   Thank You, for  using   Port Finder !   º
echo    º                                                                       º
echo    ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
goto :end
:error
cls
echo    ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo    º                                                         º
echo    º  The file PF.COM must be in the same default directory  º
echo    º  as COMMTEST.BAT.  Please have these two files in the   º
echo    º  same default directory before running COMMTEST.BAT.    º
echo    º                                                         º
echo    ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
:end
