Detecting presence of COM port via Batch Script(Read 5154 times)
Detecting presence of COM port via Batch Script 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

« Last Edit: January 17, 2014, 10:43:50 AM by Craftonix »



Re: Detecting presence of COM port via Batch Script Reply #1 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.



Re: Detecting presence of COM port via Batch Script Reply #2 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.



 

Sitemap 1 2 3 4 5