-5

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"

VocalFan
  • 117
  • 2
  • 11
  • the cursor is after "Hello" and not before "echo" – phuclv Oct 31 '18 at 03:51
  • Possible duplicate of [Windows batch: echo without new line](https://stackoverflow.com/questions/7105433/windows-batch-echo-without-new-line) – phuclv Oct 31 '18 at 03:52
  • Invalid. It doesn't save my spacing. I used to align it to the middle I put the spaces inside the quotes – VocalFan Oct 31 '18 at 03:55
  • 2
    You should put previous requirement (_"I used to align it to the middle"_) in the question and in the example. In the example the cursor is _below_ the "H" of "Hello", that is, with no spacing... – Aacini Oct 31 '18 at 04:15
  • Oof got question banned. "I made it more clear now" – VocalFan Oct 31 '18 at 19:38

1 Answers1

1
@echo off
setlocal

for /F %%a in ('echo prompt $H ^| cmd') do set "BS=%%a"
set /P "=.%BS%         Hello" < nul
Aacini
  • 65,180
  • 12
  • 72
  • 108
  • 1
    This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - [From Review](/review/low-quality-posts/21283496) – Lee Oct 31 '18 at 09:44
  • @Lee: Why you deleted this answer? I am afraid you are confused. – Aacini Oct 31 '18 at 16:06
  • @MadhurBhaiya: The OP wanted that "the cursor to be in front of" the "Hello" word like this: `Hello_` (where the underscore represents the cursor)... – Aacini Oct 31 '18 at 16:07
  • @OwenPauling: ... and later added that "I used to align it to the middle I put the spaces inside the quotes". – Aacini Oct 31 '18 at 16:08
  • 1
    @Rob: My solution achieve _exactly that_! (Did you tested it?) **`:(`** – Aacini Oct 31 '18 at 16:08