How to execute a list of commands in cmd

Hi, I need to open the cmd and execute a list of commands and show their results in messageBox. Anyone please give me Idea how to do it?

Thank you in advance.

Hi @mukesh_behera

Follow the steps,

  1. Save your commands in array/List
  2. Loop it, and type the command in cmd prompt(i=0 to n-1)
  3. use screen scraping/ocr based activities to display it in message box

For your reference:

Regards,

Thank you for your response,
But how I will manipulate OCR output as all output are different.

You can use Screen Scraping, and then use string manipulating…

Yes but there will be a list of outputs and how i can manipulate using a single manipulation statement?

Hello

It might not be possible in one single activity.

It will likely require more than 1 step.

You can check out these posts:

I would suggest, when you are ready providing a sample, the expected output and tell us about the pattern of the text.

Hopefully this helps.

You can assign it to a single variable and use same string manipulation statement(regex or split string)

For – list of commands{
type into (each command);
Use Screen Scraping
Assign to a String
Message box (assign variable)
}

1 Like