How to scrap data from cmd screen

Hello,

i need tos scrap data from cmd screen

whatever data present in screen i ned to scap
how can i achieve this?
i am not using orchestrator only studio.

@Anil_G @ashokkarale @Pablito @Edwin_Barahona

Hello @Mathkar_kunal

You could use the Get OCR Text activity to extract the contents of your terminal.
And with some Regex “gymnastics” you should be able to fetch the required information :slight_smile:

Regards
Soren

1 Like

I think if you need to get data from CMD, I think you would have to use a get text or get OCR text (The ‘Get Text’ activity worked for me) and the use regex. Maybe split on linebreak before doing the regex.

1 Like

why dont you write the script in a .bat file and invoke powershell activity by passing arguments, then you would get the output variable that contains the result of the cmdlet..
OCR is the least preferable approach to be used in this case.

SG.

1 Like

i tried , not with .bat file.
check below thread

giving answer in some diffrenet language. i need in english as same as in cmd

here i have created variable

help me where i am doing wrong

Try and fill out the Language option.
Perhaps en-US or such… Press F1 on the activity to go to the help page.

My OS is running another language (Danish), but I was able to extract the english contents without filling other options.

tryied with en- US but getting same diffrenet language output

Regarding the Powershell route, does it work if you remove the Param-part and hard code the user value instead?

If it works, then you could add an Assign before the Invoke Powershell with str_command = str_command.Replace("$User", UserID).

Have you tried to just use a ‘Get text’ activity? It works for me, but I don’t know if you need something only collectable with OCR?