Capturing return value in command prompt [Closed]

Report
-
fahd_zboot
Posts
12178
Registration date
Wednesday November 28, 2007
Status
Moderator
Last seen
December 30, 2019
-
Hello,

How to catpure/get the return value when any statment/script is executed in command prompt.

1 reply

Posts
12178
Registration date
Wednesday November 28, 2007
Status
Moderator
Last seen
December 30, 2019
26
Hi !

Do you mean that you want to save the result of a DOS command on the command prompt ? That's it ?

You should precede the command with this : > c:\text.txt

That way, the result of the command will be saved on the file text.txt.

C u !