Search code examples
batch-fileecho

Cursor blink in front of text


I want the cursor to be infront of the text like this:

              Hello_

Not

              Hello
_

But I don't know how to do this. Can you help?

This is a batch file and has @echo off

"I used spacing to align it to the middle"


Solution

  • @echo off
    setlocal
    
    for /F %%a in ('echo prompt $H ^| cmd') do set "BS=%%a"
    set /P "=.%BS%         Hello" < nul