@echo off

set /p Pause=Before
>nul
set /p Pause=After

(@edit Before >nul there supposed to be sign, but it's not visible in post.)
What does this script do, is print "Before" wait till user presses enter, "Bleeps" and prints "After", after pressing enter application stops. But output is:

'' is not recognized as an internal or external command,
operable program or batch file.

I tried >nul and @echo off as you see. But it still appears. How to get rid of it?

Hello,

Try this instead:

@echo off
REM start of batch file
echo BEFORE
REM wait for them to press a key
pause
echo AFTER

You will notice that the REM lines are not printed as they are remarks

I do know they're not printed. But the problem is, I need something executed but it prints output, which I don't want being output.

Well, error doesn't show up. Neither does CMD beep.