-1

How do i delete the output echo in batch?
When i have something like this

    echo test
    ping 127.0.0.1 -n 1 > nul     //using the ping as a pause
    "something to delete the echo"

I want to make the executed batch prompt "count down" using the ping as a timed pause.

  • Why do you want to hide it after ? You only have to remove `echo test` from your script – gogaz Sep 26 '17 at 11:26
  • 1
    you can echo off to hide the echo line but what exactly you mean, I don't get you clearly. could you explain a little bit more – Reza P. Sep 26 '17 at 11:27
  • You should use a clearer description or better selection of words. For us, _"delete an echo/line"_ imply to delete a line in the Batch file. If you want to "delete the output of a previous echo command in the screen", then this question is a duplicate of [this previous one](https://stackoverflow.com/questions/44126279/how-to-clear-selected-lines-in-batch-instead-of-the-whole-screen). – Aacini Sep 26 '17 at 14:08
  • possible [duplicate](https://stackoverflow.com/questions/37938489/counter-in-batch-file-for-loop-how-to-keep-the-number-in-the-same-place?noredirect=1&lq=1) – Stephan Jan 17 '18 at 13:43

1 Answers1

1

Retrospective deletion is pretty difficult. However, if you don't want "echo test" to appear as well as the output, "test" you could replace the line with "@echo test". The @ prefix suppresses output of the command itself. if you don't want any of the instructuctions to be echoed, just their output, put "@echo off" as the first line of your batch file.

Dragonthoughts
  • 2,180
  • 8
  • 25
  • 28