배치파일 / CMD/배치파일

[배치파일]개행없이 글 출력하는 방법

:3inddlown Leaf 2020. 4. 16. 18:50
728x90

배치파일에서 echo를 사용해 글을 출력하면 자동으로 개행이 됩니다.

이때 개행 없이 글을 출력하는 방법을 알아보겠습니다.

 

 

Syntax(문법)

기본적인 문법입니다.

set /p "=문장" < nul

또는

<nul set /p "=문장"

 

 

Example(예제)
set /p "=this is a string " < nul
set /p "=print in one line." < nul
echo.

output:

this is a string print in one line.

 

반응형