Forum - Info Center - Eltima Software

Eltima Help Center => Virtual Serial Port Driver & Virtual Serial Port ActiveX => Topic started by: Craftonix on January 17, 2014, 10:31:12 AM

Title: Detecting presence of COM port via Batch Script
Post by: Craftonix on January 17, 2014, 10:31:12 AM
Hello all,

I'm trying to test with a batch script if a virtual COM port has been assigned or not.
I paired a com100 with a com200.

I tried something like that :

IF EXIST COM100 ECHO COM100 FOUND

But it seems that virtual port are not seen under command line.

Any help to detect via command line ?

Best Regards.

Note : I'm testing that under Windows XP and virtual serial port driver 6.0.1.115

Title: Re: Detecting presence of COM port via Batch Script
Post by: alexander-britt on January 17, 2014, 11:52:52 AM
To my knowledge, Windows command prompt does not offer any facilities to check if a specific COM port exists in the system. You can only get a list of all ports that are not currently in use with the "mode" command.
Title: Re: Detecting presence of COM port via Batch Script
Post by: Craftonix on January 17, 2014, 02:33:28 PM
Thanks for your quick reply Alexander.
Mode is perfect for the use i need :

MODE COM100 | find "RTS" > nul
IF errorlevel 1 ECHO NOT FOUND

Have a good week end.