Disable screen refresh in dos batch file

I am writing a C ++ program that runs commands from the DOS operating system using the system () command. So far so good that I think. But how can I turn off the screen update in the console window that appears so as not to see the thousands of messages received.

Or alternatively, how can I dump these messages elsewhere .... i.e. Is there a more elegant way to handle this, and not just turn off the screen? thank.

+3
source share
4 answers
  • To avoid repeating echoes, put this at the top of the script:

    @echo off

  • , . , :

    nameofcommand.exe params > nul 2 > & 1

, , ( ..) , , .

+1

. . echo this goes to a file > log.txt echo .

.

+1
+1

, , ... , , , , , , 7 , , . , , 0x0, ... , , .

... SLaks ...

, , , .

0

Source: https://habr.com/ru/post/1729490/


All Articles