Clear only one row of a batch file

Asked

Viewed 558 times

1

My question is whether there is any way to delete only one line of several. For example: the command prints three numbers on the screen of the prompt:

echo 1
echo 2
echo 3

And then, he just erases the printed "2", and the other two numbers remain there.

Has as?

1 answer

3


Really erase has no way.

What can be done is give command cls and reprint on screen without the second line.

Example:

@echo off

echo 1
echo 2
echo 3

pause
rem Apaga tudo que foi impresso.
cls

echo 1
echo 3

pause > nul
  • yes, I imagined the same thing, thank you anyway

Browser other questions tagged

You are not signed in. Login or sign up in order to post.