Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9013995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:24:16+00:00 2026-06-16T03:24:16+00:00

I am creating a batch file to remove virtual com ports created before using

  • 0

I am creating a batch file to remove virtual com ports created before using com0com. at the time of creation, the port names where renamed for example:

change CNCA2 portname=COM20

So when i want to remove i should use the original name like:

remove 2 

which corresponds to the original portname CNCA2

So, what i m trying to do here is if the user chooses to remove Port COM20, how can get the
original name which is CNCxx ?

below is the sample of command i used:enter image description here

as u can see, when i write remove COM150 there is no change, so i need to get the corresponding name which is remove 2.

so from the c# application how can i get the corresponding name without manually using a list command?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:24:17+00:00Added an answer on June 16, 2026 at 3:24 am

    You could spawn a command prompt process that runs the list command and capture the output by redirecting stdout to a text file. Then read the results back from the file.

    From the example above, it should be relatively simple to parse the results and use them to create a Dictionary, so you can then easily look up the original name given the new name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Creating a simple RPG game, first time using XNA. Trying to get my character
After creating a batch file in visual studio, I get an error when I
I'd like to request some help in creating a Batch file to run on
Looking at creating a simple batch file for my app. My app needs some
I'm creating a batch file (on Windows Vista) to deploy my project from development
writting an MSBuild script I have found a problem. I'm creating a batch file
This is my first time creating a batch. basically i want write commands in
I am creating a simple batch file to assist in a few things, and
I am currently working on creating installer. I have a batch file which checks
I have a simple FOR loop inside of a batch file I'm creating that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.