Capturing CMD Prompt Result

Hello,

Im a beginner and trying to study by myself.
I managed to automate to run CMD and do ping.
But I got stucked on next step.

I want to save the marked result below in a csv file.

CMD

Thank you…

best regards.

Hello @edo_rpa, Welcome to the Community !

I would recommend you write the output of the command to a file & read the file.

Somecommand >> Output.txt

Regards,
Nithin

3 Likes

Hi @Nithin_P, thank you so much for your reply.

After taking quick research about your recommendation, it indeed gives result which I need.

Thank you very much! :smiley:

Best Regard,
Edo

2 Likes

Hi @edo_rpa

I recommend that you refer to the below snippet, it maybe also useful for you.

5 Likes

@edo_rpa please mark as a solution whichever reply helped you. It helps others and closes this thread.

1 Like

Hi @Nithin_P , sorry for asking you again but i just notice that every time i do the ping, somefile.csv is being totally recreated.

Is there a way to make the data to be overwritten on the existing somefile.csv?

The thing is, there is ms vba on the existing somefile.csv and totally recreating it will remove the vba.

Thank you in advance.

BR//Edo

This will append content to the existing file, if the file does not exist it will create it. I recommend you to read the file created by command and the use Append to CSV command to retain any VBA.

Regards,
Nithin